re-implemented JWT auth

This commit is contained in:
lnn0q 2025-04-18 14:47:42 +03:00
parent c190d368de
commit b47b0f3752
18 changed files with 390 additions and 174 deletions

View file

@ -17,8 +17,9 @@ export const books = [
export async function BooksManyResolver(
_: any,
__: any,
{ identity }: IdentityContext
{ req, res, identity }: IdentityContext
): Promise<Book[]> {
if (identity == null) throw new Error('Unauthorized');
return books;
}