From cd34ade6383201d41e9623652e4e10800a91f739 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Nov 2020 17:35:40 +0900 Subject: 非ログイン時にクリップを取得できない問題を修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/api/endpoints/clips/show.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/endpoints/clips/show.ts') diff --git a/src/server/api/endpoints/clips/show.ts b/src/server/api/endpoints/clips/show.ts index 1d4947528a..dc730d64a3 100644 --- a/src/server/api/endpoints/clips/show.ts +++ b/src/server/api/endpoints/clips/show.ts @@ -7,7 +7,7 @@ import { Clips } from '../../../../models'; export const meta = { tags: ['clips', 'account'], - requireCredential: true as const, + requireCredential: false as const, kind: 'read:account', @@ -36,7 +36,7 @@ export default define(meta, async (ps, me) => { throw new ApiError(meta.errors.noSuchClip); } - if (!clip.isPublic && (clip.userId !== me.id)) { + if (!clip.isPublic && (me == null || (clip.userId !== me.id))) { throw new ApiError(meta.errors.noSuchClip); } -- cgit v1.2.3-freya