mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 11:57:34 -07:00
Refactor
This commit is contained in:
parent
0579b0c182
commit
0df9d316f9
1 changed files with 4 additions and 4 deletions
|
@ -28,15 +28,15 @@ export default define(meta, async (ps, user) => {
|
||||||
const [favorite, watching] = await Promise.all([
|
const [favorite, watching] = await Promise.all([
|
||||||
NoteFavorites.count({
|
NoteFavorites.count({
|
||||||
where: {
|
where: {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
noteId: ps.noteId
|
noteId: ps.noteId
|
||||||
},
|
},
|
||||||
take: 1
|
take: 1
|
||||||
}),
|
}),
|
||||||
NoteWatchings.count({
|
NoteWatchings.count({
|
||||||
where: {
|
where: {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
noteId: ps.noteId
|
noteId: ps.noteId
|
||||||
},
|
},
|
||||||
take: 1
|
take: 1
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue