From 7022c2f9120e9cf4b653cada3472e5119326915f Mon Sep 17 00:00:00 2001 From: hijiki Date: Sun, 20 Oct 2024 17:39:30 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88/=E3=83=8F=E3=82=A4?= =?UTF-8?q?=E3=83=A9=E3=82=A4=E3=83=88=E3=81=AE=E5=8F=96=E5=BE=97=E3=81=AB?= =?UTF-8?q?=E8=AA=8D=E8=A8=BC=E3=82=92=E8=A6=81=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/server/api/endpoints/export-custom-emojis.ts | 1 + packages/backend/src/server/api/endpoints/notes/featured.ts | 2 +- packages/backend/src/server/api/endpoints/notes/show.ts | 2 +- .../backend/src/server/api/endpoints/users/featured-notes.ts | 4 ++-- packages/backend/src/server/api/endpoints/users/notes.ts | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts index 5ff099524d..1df8fc86ec 100755 --- a/packages/backend/src/server/api/endpoints/export-custom-emojis.ts +++ b/packages/backend/src/server/api/endpoints/export-custom-emojis.ts @@ -11,6 +11,7 @@ import { QueueService } from '@/core/QueueService.js'; export const meta = { secure: true, requireCredential: true, + requireModerator: true, limit: { duration: ms('1hour'), max: 1, diff --git a/packages/backend/src/server/api/endpoints/notes/featured.ts b/packages/backend/src/server/api/endpoints/notes/featured.ts index dcd971360d..00610a7434 100755 --- a/packages/backend/src/server/api/endpoints/notes/featured.ts +++ b/packages/backend/src/server/api/endpoints/notes/featured.ts @@ -15,7 +15,7 @@ import { CacheService } from '@/core/CacheService.js'; export const meta = { tags: ['notes'], - requireCredential: false, + requireCredential: true, allowGet: true, cacheSec: 3600, diff --git a/packages/backend/src/server/api/endpoints/notes/show.ts b/packages/backend/src/server/api/endpoints/notes/show.ts index f82ba5473d..8440b26088 100755 --- a/packages/backend/src/server/api/endpoints/notes/show.ts +++ b/packages/backend/src/server/api/endpoints/notes/show.ts @@ -14,7 +14,7 @@ import { ApiError } from '../../error.js'; export const meta = { tags: ['notes'], - requireCredential: false, + requireCredential: true, res: { type: 'object', diff --git a/packages/backend/src/server/api/endpoints/users/featured-notes.ts b/packages/backend/src/server/api/endpoints/users/featured-notes.ts index e01f19ba7a..71f047c3c5 100755 --- a/packages/backend/src/server/api/endpoints/users/featured-notes.ts +++ b/packages/backend/src/server/api/endpoints/users/featured-notes.ts @@ -13,9 +13,9 @@ import { CacheService } from '@/core/CacheService.js'; import { isUserRelated } from '@/misc/is-user-related.js'; export const meta = { - tags: ['notes'], + tags: ['users', 'notes'], - requireCredential: false, + requireCredential: true, allowGet: true, cacheSec: 3600, diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index cc76c12f1d..358946e1eb 100755 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -21,6 +21,8 @@ import { ApiError } from '@/server/api/error.js'; export const meta = { tags: ['users', 'notes'], + requireCredential: true, + res: { type: 'array', optional: false, nullable: false,