mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Lint project
This commit is contained in:
@@ -33,6 +33,6 @@ Route.group(() => {
|
||||
}).prefix('stats')
|
||||
}).middleware('auth:web,api')
|
||||
|
||||
Route.get('/files/:filename', async({ response, params }) => {
|
||||
Route.get('/files/:filename', async ({ response, params }) => {
|
||||
response.download(Application.makePath('storage', params.filename))
|
||||
})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import Env from '@ioc:Adonis/Core/Env'
|
||||
import Route from '@ioc:Adonis/Core/Route'
|
||||
import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
|
||||
import HealthCheck from '@ioc:Adonis/Core/HealthCheck'
|
||||
|
||||
const BASE_URL = Env.get('BASE_URL')
|
||||
|
||||
Route.get('/', async({ response }: HttpContextContract) => {
|
||||
Route.get('/', async ({ response }: HttpContextContract) => {
|
||||
return response.status(200).send({
|
||||
domain: BASE_URL,
|
||||
version: Env.get('API_VERSION'),
|
||||
@@ -25,11 +25,11 @@ Route.get('/', async({ response }: HttpContextContract) => {
|
||||
})
|
||||
})
|
||||
|
||||
Route.get('/source', async({ response }: HttpContextContract) => {
|
||||
Route.get('/source', async ({ response }: HttpContextContract) => {
|
||||
return response.redirect(Env.get('GITHUB_SOURCE'))
|
||||
})
|
||||
|
||||
Route.get('/health', async({ response }: HttpContextContract) => {
|
||||
Route.get('/health', async ({ response }: HttpContextContract) => {
|
||||
const report = await HealthCheck.getReport()
|
||||
const isLive = await HealthCheck.isLive()
|
||||
const isReady = HealthCheck.isReady()
|
||||
|
||||
Reference in New Issue
Block a user