fix: favorite transactional

This commit is contained in:
diced
2025-07-11 11:47:58 -07:00
parent 8b59e1dc53
commit db7cf70bca
2 changed files with 5 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ export default fastifyPlugin(
return res.send(resp);
}
if (favorite) {
if (typeof favorite === 'boolean') {
const resp = await prisma.file.updateMany({
where: {
id: {
@@ -87,7 +87,7 @@ export default fastifyPlugin(
},
data: {
favorite: favorite ?? false,
favorite: favorite,
},
});