mizzkey/src/server/api/endpoints/i/get-word-muted-notes-count.ts

23 lines
351 B
TypeScript
Raw Normal View History

import define from '../../define';
import { MutedNotes } from '../../../../models';
export const meta = {
tags: ['account'],
requireCredential: true as const,
kind: 'read:account',
params: {
}
};
export default define(meta, async (ps, user) => {
return {
count: await MutedNotes.count({
userId: user.id,
reason: 'word'
})
};
});