From 0fdffe5288f622d449cf2e30a32a26f41c6b3864 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 27 Jul 2021 03:10:24 +0900 Subject: [PATCH 1/2] remove all mode --- src/server/api/endpoints/sw/unregister.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/server/api/endpoints/sw/unregister.ts b/src/server/api/endpoints/sw/unregister.ts index e086357db8..a206254950 100644 --- a/src/server/api/endpoints/sw/unregister.ts +++ b/src/server/api/endpoints/sw/unregister.ts @@ -16,21 +16,11 @@ export const meta = { endpoint: { validator: $.str }, - - all: { - validator: $.optional.bool, - default: false, - desc: { - 'ja-JP': 'false(デフォルト)は、自分の登録のみが解除されます。trueを指定すると、指定したエンドポイントのすべての登録を解除します。' - } - } } }; export default define(meta, async (ps, user) => { - await SwSubscriptions.delete(ps.all ? { - endpoint: ps.endpoint, - } : { + await SwSubscriptions.delete({ userId: user.id, endpoint: ps.endpoint, }); From 1507b786218ff2357efd5b71c609376a53e15903 Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 20 Aug 2021 14:25:09 +0900 Subject: [PATCH 2/2] add changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 159de1dea4..29914ae4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ ### Improvements - 依存関係の更新 +- API: sw/unregisterを追加 ### Bugfixes - チャンネルを作成しているとアカウントを削除できないのを修正