2021-08-19 07:55:45 -05:00
|
|
|
import define from '../../define';
|
|
|
|
import { MutedNotes } from '@/models/index';
|
2020-08-08 23:46:19 -05:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['account'],
|
|
|
|
|
|
|
|
requireCredential: true as const,
|
|
|
|
|
|
|
|
kind: 'read:account',
|
|
|
|
|
|
|
|
params: {
|
2021-03-06 07:34:11 -06: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-08 23:46:19 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default define(meta, async (ps, user) => {
|
|
|
|
return {
|
|
|
|
count: await MutedNotes.count({
|
|
|
|
userId: user.id,
|
|
|
|
reason: 'word'
|
|
|
|
})
|
|
|
|
};
|
|
|
|
});
|