re-implemented JWT auth
This commit is contained in:
parent
c190d368de
commit
b47b0f3752
18 changed files with 390 additions and 174 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue