2019-02-18 20:52:41 +09:00
|
|
|
import User from '../../../../models/user';
|
|
|
|
import define from '../../define';
|
|
|
|
|
|
|
|
export const meta = {
|
2019-02-23 11:20:58 +09:00
|
|
|
tags: ['account', 'following'],
|
|
|
|
|
2019-02-18 20:52:41 +09:00
|
|
|
requireCredential: true,
|
|
|
|
|
|
|
|
kind: 'account-write',
|
|
|
|
|
|
|
|
params: {
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-02-22 11:46:58 +09:00
|
|
|
export default define(meta, async (ps, user) => {
|
2019-02-18 20:52:41 +09:00
|
|
|
await User.update({ _id: user._id }, {
|
|
|
|
$set: {
|
|
|
|
pendingReceivedFollowRequestsCount: 0
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2019-02-22 11:46:58 +09:00
|
|
|
return;
|
|
|
|
});
|