mirror of
https://github.com/diced/zipline.git
synced 2026-01-07 19:01:21 -08:00
fix: favorite transactional
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user