This commit is contained in:
syuilo 2021-12-09 23:58:30 +09:00
parent 0abe2dfee0
commit c69b72e199
573 changed files with 3318 additions and 3318 deletions

View file

@ -11,7 +11,7 @@ export const meta = {
params: {
noteId: {
validator: $.type(ID),
}
},
},
res: {
@ -20,18 +20,18 @@ export const meta = {
properties: {
isFavorited: {
type: 'boolean' as const,
optional: false as const, nullable: false as const
optional: false as const, nullable: false as const,
},
isWatching: {
type: 'boolean' as const,
optional: false as const, nullable: false as const
optional: false as const, nullable: false as const,
},
isMutedThread: {
type: 'boolean' as const,
optional: false as const, nullable: false as const
optional: false as const, nullable: false as const,
},
}
}
},
},
};
export default define(meta, async (ps, user) => {
@ -43,21 +43,21 @@ export default define(meta, async (ps, user) => {
userId: user.id,
noteId: note.id,
},
take: 1
take: 1,
}),
NoteWatchings.count({
where: {
userId: user.id,
noteId: note.id,
},
take: 1
take: 1,
}),
NoteThreadMutings.count({
where: {
userId: user.id,
threadId: note.threadId || note.id,
},
take: 1
take: 1,
}),
]);