From f0cbdd7d505b6bb694e6a3eaca8e9c2f24723310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=82=B9=E3=82=AB=E3=83=BC=E3=80=81?= Date: Thu, 31 Oct 2024 22:45:19 +0900 Subject: [PATCH] fix: no visitor data access --- packages/backend/src/server/api/endpoints/announcements.ts | 4 +++- .../backend/src/server/api/endpoints/announcements/show.ts | 4 +++- .../backend/src/server/api/endpoints/federation/followers.ts | 4 +++- .../backend/src/server/api/endpoints/federation/following.ts | 4 +++- .../src/server/api/endpoints/federation/show-instance.ts | 4 +++- packages/backend/src/server/api/endpoints/federation/users.ts | 4 +++- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/announcements.ts b/packages/backend/src/server/api/endpoints/announcements.ts index ff8dd7360..5944f15d8 100644 --- a/packages/backend/src/server/api/endpoints/announcements.ts +++ b/packages/backend/src/server/api/endpoints/announcements.ts @@ -14,7 +14,9 @@ import type { AnnouncementsRepository } from '@/models/_.js'; export const meta = { tags: ['meta'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:announcements', res: { type: 'array', diff --git a/packages/backend/src/server/api/endpoints/announcements/show.ts b/packages/backend/src/server/api/endpoints/announcements/show.ts index 6312a0a54..c27554d79 100644 --- a/packages/backend/src/server/api/endpoints/announcements/show.ts +++ b/packages/backend/src/server/api/endpoints/announcements/show.ts @@ -12,7 +12,9 @@ import { ApiError } from '../../error.js'; export const meta = { tags: ['meta'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:announcements', res: { type: 'object', diff --git a/packages/backend/src/server/api/endpoints/federation/followers.ts b/packages/backend/src/server/api/endpoints/federation/followers.ts index ce4dd1306..42c4f75a6 100644 --- a/packages/backend/src/server/api/endpoints/federation/followers.ts +++ b/packages/backend/src/server/api/endpoints/federation/followers.ts @@ -13,7 +13,9 @@ import { DI } from '@/di-symbols.js'; export const meta = { tags: ['federation'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:federation', res: { type: 'array', diff --git a/packages/backend/src/server/api/endpoints/federation/following.ts b/packages/backend/src/server/api/endpoints/federation/following.ts index 1a793889c..1c2545579 100644 --- a/packages/backend/src/server/api/endpoints/federation/following.ts +++ b/packages/backend/src/server/api/endpoints/federation/following.ts @@ -13,7 +13,9 @@ import { DI } from '@/di-symbols.js'; export const meta = { tags: ['federation'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:federation', res: { type: 'array', diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index 2972861a4..7c1f0c948 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -13,7 +13,9 @@ import { DI } from '@/di-symbols.js'; export const meta = { tags: ['federation'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:federation', res: { type: 'object', diff --git a/packages/backend/src/server/api/endpoints/federation/users.ts b/packages/backend/src/server/api/endpoints/federation/users.ts index 71b1aeb07..36afd5c2c 100644 --- a/packages/backend/src/server/api/endpoints/federation/users.ts +++ b/packages/backend/src/server/api/endpoints/federation/users.ts @@ -13,7 +13,9 @@ import { DI } from '@/di-symbols.js'; export const meta = { tags: ['federation'], - requireCredential: false, + requireCredential: true, + secure: true, + kind: 'read:federation', res: { type: 'array',