Skip to content

Commit

Permalink
fix(backend): /@ にアクセスするとサーバーエラーが発生する問題を修正 (#13884)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih authored May 27, 2024
1 parent 3ffbf62 commit 1df8ea8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/backend/src/server/web/ClientServerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 1df8ea8

Please sign in to comment.