Files
my-links/app/middleware/silent_auth_middleware.ts
2024-10-07 02:07:39 +02:00

10 lines
254 B
TypeScript

import type { HttpContext } from '@adonisjs/core/http';
import type { NextFn } from '@adonisjs/core/types/http';
export default class SilentAuthMiddleware {
async handle(ctx: HttpContext, next: NextFn) {
await ctx.auth.check();
return next();
}
}