mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-14 12:14:33 +01:00
Add middleware to protect a route
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import Route from "@ioc:Adonis/Core/Route";
|
||||
|
||||
Route.group(() => {
|
||||
Route.get('/me', 'AuthController.user')
|
||||
Route.get('/me', 'AuthController.user').middleware('auth:web,api')
|
||||
Route.post('/token', 'AuthController.createInfiniteToken')
|
||||
|
||||
Route.group(() => {
|
||||
|
||||
Reference in New Issue
Block a user