Skip to content

Commit

Permalink
fix(backend): /@ にアクセスするとサーバーエラーが発生する問題を修正 (misskey-dev#13884)
Browse files Browse the repository at this point in the history
Cherry-picked from 1df8ea8

Co-authored-by: かっこかり <[email protected]>
  • Loading branch information
kakkokari-gtyih authored and u1-liquid committed Nov 5, 2024
1 parent b1b5bdf commit d88c36b
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 @@ -478,7 +478,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 @@ -491,7 +493,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 @@ -504,7 +508,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 d88c36b

Please sign in to comment.