Bilder speichern nach ausweis gespeichert fix
This commit is contained in:
@@ -25,7 +25,7 @@ export const PUT = defineApiRoute({
|
||||
|
||||
prisma.$transaction(async tx => {
|
||||
for (const uid of input) {
|
||||
const img = await tx.bild.update({
|
||||
await tx.bild.update({
|
||||
where: {
|
||||
uid,
|
||||
aufnahme_id: null
|
||||
@@ -37,13 +37,6 @@ export const PUT = defineApiRoute({
|
||||
uid: true
|
||||
}
|
||||
})
|
||||
|
||||
if (!img) {
|
||||
throw new APIError({
|
||||
code: "NOT_FOUND",
|
||||
message: "Bild existiert nicht oder gehört bereits zu einer anderen Aufnahme."
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user