fix(backend): /@
にアクセスするとサーバーエラーが発生する問題を修正 (misskey-dev#13884)
Cherry-picked from 1df8ea824e5dace883f0d6855d7342984c8032d0 Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
This commit is contained in:
parent
613e0a8aa3
commit
45faba3567
@ -478,7 +478,9 @@ export class ClientServerService {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Atom
|
// 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);
|
const feed = await getFeed(request.params.user);
|
||||||
|
|
||||||
if (feed) {
|
if (feed) {
|
||||||
@ -491,7 +493,9 @@ export class ClientServerService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// RSS
|
// 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);
|
const feed = await getFeed(request.params.user);
|
||||||
|
|
||||||
if (feed) {
|
if (feed) {
|
||||||
@ -504,7 +508,9 @@ export class ClientServerService {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// JSON
|
// 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);
|
const feed = await getFeed(request.params.user);
|
||||||
|
|
||||||
if (feed) {
|
if (feed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user