mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
fix: /oauth/oauth to /oauth
This commit is contained in:
parent
2b06b822ac
commit
031d748d0c
1 changed files with 3 additions and 3 deletions
|
@ -131,7 +131,7 @@ export class OAuth2ProviderService {
|
||||||
|
|
||||||
fastify.register(multer.contentParser);
|
fastify.register(multer.contentParser);
|
||||||
|
|
||||||
fastify.get('/oauth/authorize', async (request, reply) => {
|
fastify.get('/authorize', async (request, reply) => {
|
||||||
const query: any = request.query;
|
const query: any = request.query;
|
||||||
let param = "mastodon=true";
|
let param = "mastodon=true";
|
||||||
if (query.state) param += `&state=${query.state}`;
|
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;
|
const query: any = request.query;
|
||||||
let param = "mastodon=true";
|
let param = "mastodon=true";
|
||||||
if (query.state) param += `&state=${query.state}`;
|
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;
|
const body: any = request.body || request.query;
|
||||||
if (body.grant_type === "client_credentials") {
|
if (body.grant_type === "client_credentials") {
|
||||||
const ret = {
|
const ret = {
|
||||||
|
|
Loading…
Reference in a new issue