feat: #9614
This commit is contained in:
parent
46d4327fce
commit
68b2dcfd75
@ -68,6 +68,17 @@ mastoRouter.use(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
mastoRouter.use(async (ctx, next) => {
|
||||||
|
if (ctx.request.query) {
|
||||||
|
if (!ctx.request.body || Object.keys(ctx.request.body).length === 0) {
|
||||||
|
ctx.request.body = ctx.request.query
|
||||||
|
} else {
|
||||||
|
ctx.request.body = {...ctx.request.body, ...ctx.request.query}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await next();
|
||||||
|
});
|
||||||
|
|
||||||
apiMastodonCompatible(mastoRouter);
|
apiMastodonCompatible(mastoRouter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -78,6 +78,17 @@ mastoRouter.use(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
mastoRouter.use(async (ctx, next) => {
|
||||||
|
if (ctx.request.query) {
|
||||||
|
if (!ctx.request.body || Object.keys(ctx.request.body).length === 0) {
|
||||||
|
ctx.request.body = ctx.request.query
|
||||||
|
} else {
|
||||||
|
ctx.request.body = {...ctx.request.body, ...ctx.request.query}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await next();
|
||||||
|
});
|
||||||
|
|
||||||
// Routing
|
// Routing
|
||||||
router.use(activityPub.routes());
|
router.use(activityPub.routes());
|
||||||
router.use(nodeinfo.routes());
|
router.use(nodeinfo.routes());
|
||||||
|
Loading…
Reference in New Issue
Block a user