summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/following/unstalk.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/following/unstalk.ts')
-rw-r--r--src/server/api/endpoints/following/unstalk.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/server/api/endpoints/following/unstalk.ts b/src/server/api/endpoints/following/unstalk.ts
index 00e91357ec..66e99bed58 100644
--- a/src/server/api/endpoints/following/unstalk.ts
+++ b/src/server/api/endpoints/following/unstalk.ts
@@ -1,7 +1,6 @@
import $ from 'cafy'; import ID, { transform } from '../../../../misc/cafy-id';
import Following from '../../../../models/following';
-import { ILocalUser } from '../../../../models/user';
-import getParams from '../../get-params';
+import define from '../../define';
export const meta = {
desc: {
@@ -21,10 +20,7 @@ export const meta = {
}
};
-export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
- const [ps, psErr] = getParams(meta, params);
- if (psErr) return rej(psErr);
-
+export default define(meta, (ps, user) => new Promise(async (res, rej) => {
const follower = user;
// Fetch following
@@ -47,4 +43,4 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
res();
// TODO: イベント
-});
+}));