mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
Make tests pass
This commit is contained in:
parent
91242b73bf
commit
4ced6744fa
2 changed files with 12 additions and 12 deletions
|
|
@ -12,7 +12,9 @@ export default async (
|
|||
req: Request,
|
||||
matchedRoute: MatchedRoute
|
||||
): Promise<Response> => {
|
||||
const scopes = matchedRoute.query.scopes.replaceAll("+", " ").split(" ");
|
||||
const scopes = (matchedRoute.query.scopes || "")
|
||||
.replaceAll("+", " ")
|
||||
.split(" ");
|
||||
const redirect_uri = matchedRoute.query.redirect_uri;
|
||||
const response_type = matchedRoute.query.response_type;
|
||||
const client_id = matchedRoute.query.client_id;
|
||||
|
|
@ -54,10 +56,5 @@ export default async (
|
|||
await token.save();
|
||||
|
||||
// Redirect back to application
|
||||
return new Response(null, {
|
||||
status: 302,
|
||||
headers: {
|
||||
Location: `${redirect_uri}?code=${token.code}`,
|
||||
},
|
||||
});
|
||||
return Response.redirect(`${redirect_uri}?code=${token.code}`);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue