mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-25 17:10:27 +01:00
Add double check in middleware
This commit is contained in:
@@ -15,7 +15,8 @@ export default class SilentAuthMiddleware {
|
|||||||
* Check if user is logged-in or not. If yes, then `ctx.auth.user` will be
|
* Check if user is logged-in or not. If yes, then `ctx.auth.user` will be
|
||||||
* set to the instance of the currently logged in user.
|
* set to the instance of the currently logged in user.
|
||||||
*/
|
*/
|
||||||
await auth.check()
|
await auth.use('api').check()
|
||||||
|
await auth.use('web').check()
|
||||||
await next()
|
await next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user