Working on auth

This commit is contained in:
2021-09-14 18:18:19 +02:00
parent fa53293640
commit 51e92d7c02
11 changed files with 40 additions and 157 deletions

View File

@@ -1,7 +1,7 @@
import Route from "@ioc:Adonis/Core/Route";
Route.group(() => {
Route.get('/me', 'AuthController.user').middleware('auth')
Route.get('/me', 'AuthController.user')
Route.post('/token', 'AuthController.createInfiniteToken')
Route.group(() => {

View File

@@ -26,7 +26,7 @@ Route.get('/source', async ({response}: HttpContextContract) => {
Route.get('/health', async ({response}: HttpContextContract) => {
const report = await HealthCheck.getReport()
const isLive = await HealthCheck.isLive()
const isReady = await HealthCheck.isReady()
const isReady = HealthCheck.isReady()
return report.healthy ? response.ok({isLive, isReady, report: report.report}) : response.badRequest({
isLive,
isReady,