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