Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
This commit is contained in:
2021-07-09 21:06:37 +02:00
parent 7a5b4a7b38
commit 48cb456c60
9 changed files with 24 additions and 216 deletions

View File

@@ -10,6 +10,7 @@ Route.group(() => {
Route.get('/subscribers', 'SubscribersController.get')
Route.post('/subscribers', 'SubscribersController.store')
Route.delete('/subscribers', 'SubscribersController.delete')
Route.get('/guestbook', 'GuestBookController.get')
Route.get('/guestbook', 'GuestBookController.index')
Route.post('/guestbook', 'GuestBookController.store')
Route.post('/guestbook/:email', 'GuestBookController.store')
}).middleware('auth')

View File

@@ -3,21 +3,6 @@ import Route from "@ioc:Adonis/Core/Route";
Route.group(() => {
Route.get('/me', 'AuthController.user').middleware('auth')
Route.post('/token', 'AuthController.createInfiniteToken')
Route.post('/login', 'AuthController.login')
Route.post('/logout', 'AuthController.logout')
Route.get('/twitter/callback', 'AuthController.twitter')
Route.get('/github/callback', 'AuthController.github')
Route.get('/google/callback', 'AuthController.google')
Route.get('/twitter', async ({ally}) => {
return ally.use('twitter').redirect()
})
Route.get('/github', async ({ally}) => {
return ally.use('github').redirect()
})
Route.get('/google', async ({ally}) => {
return ally.use('google').redirect()
})
}).prefix('/auth')