rudeshark.net/src/server/api/endpoints/i/clear-follow-request-notification.ts

24 lines
370 B
TypeScript
Raw Normal View History

import User from '../../../../models/user';
import define from '../../define';
export const meta = {
tags: ['account', 'following'],
requireCredential: true,
kind: 'account-write',
params: {
}
};
export default define(meta, async (ps, user) => {
await User.update({ _id: user._id }, {
$set: {
pendingReceivedFollowRequestsCount: 0
}
});
return;
});