Update api definitions

This commit is contained in:
syuilo 2018-07-17 04:36:44 +09:00
parent aacfb5e221
commit 16726789da
66 changed files with 586 additions and 156 deletions

View file

@ -2,9 +2,17 @@ import $ from 'cafy'; import ID from '../../../../../misc/cafy-id';
import cancelFollowRequest from '../../../../../services/following/requests/cancel';
import User, { pack, ILocalUser } from '../../../../../models/user';
/**
* Cancel a follow request
*/
export const meta = {
desc: {
ja: '自分が作成した、指定したフォローリクエストをキャンセルします。',
en: 'Cancel a follow request.'
},
requireCredential: true,
kind: 'following-write'
};
export default (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
// Get 'userId' parameter
const [followeeId, followeeIdErr] = $.type(ID).get(params.userId);