feat: add api controllers and routes for browser extension

This commit is contained in:
Sonny
2025-08-28 16:44:31 +02:00
parent 9aa71dad30
commit 208f2c631f
28 changed files with 353 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
import { HttpContext } from '@adonisjs/core/http';
export function getTokenFromHeader(ctx: HttpContext) {
const authHeader = ctx.request.header('Authorization');
if (!authHeader || !authHeader.startsWith('Bearer ')) {
return null;
}
return authHeader.substring(7);
}