Skip to content
Snippets Groups Projects
Commit 031d748d authored by Marie's avatar Marie
Browse files

fix: /oauth/oauth to /oauth

parent 2b06b822
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ export class OAuth2ProviderService {
fastify.register(multer.contentParser);
fastify.get('/oauth/authorize', async (request, reply) => {
fastify.get('/authorize', async (request, reply) => {
const query: any = request.query;
let param = "mastodon=true";
if (query.state) param += `&state=${query.state}`;
......@@ -142,7 +142,7 @@ export class OAuth2ProviderService {
);
});
fastify.get('/oauth/authorize/', async (request, reply) => {
fastify.get('/authorize/', async (request, reply) => {
const query: any = request.query;
let param = "mastodon=true";
if (query.state) param += `&state=${query.state}`;
......@@ -153,7 +153,7 @@ export class OAuth2ProviderService {
);
});
fastify.post('/oauth/token', { preHandler: upload.none() }, async (request, reply) => {
fastify.post('/token', { preHandler: upload.none() }, async (request, reply) => {
const body: any = request.body || request.query;
if (body.grant_type === "client_credentials") {
const ret = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment