enhance(client): ミュートされたノート数を表示するようにしたり
This commit is contained in:
parent
917d3d0bd3
commit
d780e5b251
7 changed files with 39 additions and 11 deletions
22
src/server/api/endpoints/i/get-word-muted-notes-count.ts
Normal file
22
src/server/api/endpoints/i/get-word-muted-notes-count.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
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'
|
||||
})
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue