diff options
author | 2024-02-10 18:37:40 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /app/Middleware/Dashboard.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
Diffstat (limited to 'app/Middleware/Dashboard.ts')
-rw-r--r-- | app/Middleware/Dashboard.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/Middleware/Dashboard.ts b/app/Middleware/Dashboard.ts index f29794c..19c8cfc 100644 --- a/app/Middleware/Dashboard.ts +++ b/app/Middleware/Dashboard.ts | |||
@@ -1,14 +1,14 @@ | |||
1 | import type { HttpContext } from '@adonisjs/core/http' | 1 | import type { HttpContext } from '@adonisjs/core/http'; |
2 | import { Config } from '@adonisjs/core/config' | 2 | import { Config } from '@adonisjs/core/config'; |
3 | 3 | ||
4 | export default class Dashboard { | 4 | export default class Dashboard { |
5 | public async handle({ response }: HttpContext, next: () => Promise<void>) { | 5 | public async handle({ response }: HttpContext, next: () => Promise<void>) { |
6 | if (Config.get('dashboard.enabled') === false) { | 6 | if (Config.get('dashboard.enabled') === false) { |
7 | response.send( | 7 | response.send( |
8 | 'The user dashboard is disabled on this server\n\nIf you are the server owner, please set IS_DASHBOARD_ENABLED to true to enable the dashboard.' | 8 | 'The user dashboard is disabled on this server\n\nIf you are the server owner, please set IS_DASHBOARD_ENABLED to true to enable the dashboard.', |
9 | ) | 9 | ); |
10 | } else { | 10 | } else { |
11 | await next() | 11 | await next(); |
12 | } | 12 | } |
13 | } | 13 | } |
14 | } | 14 | } |