summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-18 20:52:41 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-18 20:52:41 +0900
commitb31d1ce61d0e5779391a7ddf19ab742e20576f81 (patch)
treeba0929c62bb87ee5f7dcc8dc755831700bb44fa1 /src/server/api/endpoints
parent:art: (diff)
downloadsharkey-b31d1ce61d0e5779391a7ddf19ab742e20576f81.tar.gz
sharkey-b31d1ce61d0e5779391a7ddf19ab742e20576f81.tar.bz2
sharkey-b31d1ce61d0e5779391a7ddf19ab742e20576f81.zip
フォローリクエスト数がおかしい場合の応急処置APIを追加
Diffstat (limited to 'src/server/api/endpoints')
-rw-r--r--src/server/api/endpoints/i/clear-follow-request-notification.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/api/endpoints/i/clear-follow-request-notification.ts b/src/server/api/endpoints/i/clear-follow-request-notification.ts
new file mode 100644
index 0000000000..af4302621b
--- /dev/null
+++ b/src/server/api/endpoints/i/clear-follow-request-notification.ts
@@ -0,0 +1,21 @@
+import User from '../../../../models/user';
+import define from '../../define';
+
+export const meta = {
+ requireCredential: true,
+
+ kind: 'account-write',
+
+ params: {
+ }
+};
+
+export default define(meta, (ps, user) => new Promise(async (res, rej) => {
+ await User.update({ _id: user._id }, {
+ $set: {
+ pendingReceivedFollowRequestsCount: 0
+ }
+ });
+
+ res();
+}));