Merge pull request 'Fix: 500 server error when attempting to fetch followers-only reply as guest' (#9983) from s1idewhist1e/calckey:issue/9075 into develop
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9983
This commit is contained in:
commit
6a1ba9f07c
1 changed files with 23 additions and 20 deletions
|
@ -399,8 +399,10 @@ router.get("/notes/:note", async (ctx, next) => {
|
|||
visibility: In(["public", "home"]),
|
||||
});
|
||||
|
||||
try {
|
||||
if (note) {
|
||||
const _note = await Notes.pack(note);
|
||||
|
||||
const profile = await UserProfiles.findOneByOrFail({ userId: note.userId });
|
||||
const meta = await fetchMeta();
|
||||
await ctx.render("note", {
|
||||
|
@ -421,6 +423,7 @@ router.get("/notes/:note", async (ctx, next) => {
|
|||
|
||||
return;
|
||||
}
|
||||
} catch {}
|
||||
|
||||
await next();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue