Skip to content
Snippets Groups Projects
Commit 0d05f056 authored by syuilo's avatar syuilo
Browse files

chore: add note

parent 21de5c4a
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,7 @@ router.get('/notes/:note', async (ctx, next) => {
if (!isActivityPubReq(ctx)) return await next();
// TODO: typeorm 3.0にしたら .then(x => x || null) は消せる
// nginxとかでキャッシュしてくれそうだからそもそもnode側でのキャッシュ不要かも?
const note = await noteCache.fetch(ctx.params.note, () => Notes.findOne({
id: ctx.params.note,
visibility: In(['public' as const, 'home' as const]),
......@@ -167,6 +168,7 @@ router.get('/users/:user', async (ctx, next) => {
const userId = ctx.params.user;
// TODO: typeorm 3.0にしたら .then(x => x || null) は消せる
// nginxとかでキャッシュしてくれそうだからそもそもnode側でのキャッシュ不要かも?
const user = await userCache.fetch(userId, () => Users.findOne({
id: userId,
host: null,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment