mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-22 05:55:12 +00:00
fix(backend): /@
にアクセスするとサーバーエラーが発生する問題を修正 (#13884)
This commit is contained in:
parent
3ffbf6296f
commit
1df8ea824e
1 changed files with 9 additions and 3 deletions
|
@ -466,7 +466,9 @@ export class ClientServerService {
|
|||
};
|
||||
|
||||
// Atom
|
||||
fastify.get<{ Params: { user: string; } }>('/@:user.atom', async (request, reply) => {
|
||||
fastify.get<{ Params: { user?: string; } }>('/@:user.atom', async (request, reply) => {
|
||||
if (request.params.user == null) return await renderBase(reply);
|
||||
|
||||
const feed = await getFeed(request.params.user);
|
||||
|
||||
if (feed) {
|
||||
|
@ -479,7 +481,9 @@ export class ClientServerService {
|
|||
});
|
||||
|
||||
// RSS
|
||||
fastify.get<{ Params: { user: string; } }>('/@:user.rss', async (request, reply) => {
|
||||
fastify.get<{ Params: { user?: string; } }>('/@:user.rss', async (request, reply) => {
|
||||
if (request.params.user == null) return await renderBase(reply);
|
||||
|
||||
const feed = await getFeed(request.params.user);
|
||||
|
||||
if (feed) {
|
||||
|
@ -492,7 +496,9 @@ export class ClientServerService {
|
|||
});
|
||||
|
||||
// JSON
|
||||
fastify.get<{ Params: { user: string; } }>('/@:user.json', async (request, reply) => {
|
||||
fastify.get<{ Params: { user?: string; } }>('/@:user.json', async (request, reply) => {
|
||||
if (request.params.user == null) return await renderBase(reply);
|
||||
|
||||
const feed = await getFeed(request.params.user);
|
||||
|
||||
if (feed) {
|
||||
|
|
Loading…
Reference in a new issue