chore: Update client to use bearer token

This commit is contained in:
SleeplessOne1917 2023-09-22 21:28:19 -04:00
parent 641b88cd25
commit 8a7017eb1c
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ export default async (req: Request, res: Response) => {
: undefined;
if (auth) {
client.setHeaders({ auth });
client.setHeaders({ Authorization: `Bearer ${auth}` });
}
const { path, url, query } = req;

View file

@ -82,7 +82,7 @@ export class UserService {
const { jwt } = cookie.parse(document.cookie);
if (jwt) {
HttpService.client.setHeaders({ auth: jwt });
HttpService.client.setHeaders({ Authorization: `Bearer ${jwt}` });
this.jwtInfo = { jwt, claims: jwt_decode(jwt) };
}
}