From 630078f92ef5f2c4be25ca1eb6bd0d7980c479f4 Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Mon, 3 Jul 2023 07:17:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor(`ApQuestionService.ts`):=20`any`?= =?UTF-8?q?=E3=82=92=E6=B6=88=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/core/activitypub/models/ApQuestionService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/activitypub/models/ApQuestionService.ts b/packages/backend/src/core/activitypub/models/ApQuestionService.ts index c5cec5a396..0397ddf435 100644 --- a/packages/backend/src/core/activitypub/models/ApQuestionService.ts +++ b/packages/backend/src/core/activitypub/models/ApQuestionService.ts @@ -68,8 +68,9 @@ export class ApQuestionService { * @returns true if updated */ @bindThis - public async updateQuestion(value: any, resolver?: Resolver) { + public async updateQuestion(value: string | IObject, resolver?: Resolver) { const uri = typeof value === 'string' ? value : value.id; + if (uri == null) throw new Error(''); // TODO // URIがこのサーバーを指しているならスキップ if (uri.startsWith(this.config.url + '/')) throw new Error('uri points local');