2020-08-09 04:46:19 +00:00
|
|
|
import define from '../../define';
|
|
|
|
import { MutedNotes } from '../../../../models';
|
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['account'],
|
|
|
|
|
|
|
|
requireCredential: true as const,
|
|
|
|
|
|
|
|
kind: 'read:account',
|
|
|
|
|
|
|
|
params: {
|
2021-03-06 13:34:11 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
res: {
|
|
|
|
type: 'object' as const,
|
|
|
|
optional: false as const, nullable: false as const,
|
|
|
|
properties: {
|
|
|
|
count: {
|
|
|
|
type: 'number' as const,
|
|
|
|
optional: false as const, nullable: false as const
|
|
|
|
}
|
|
|
|
}
|
2020-08-09 04:46:19 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default define(meta, async (ps, user) => {
|
|
|
|
return {
|
|
|
|
count: await MutedNotes.count({
|
|
|
|
userId: user.id,
|
|
|
|
reason: 'word'
|
|
|
|
})
|
|
|
|
};
|
|
|
|
});
|