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