Bilder speichern nach ausweis gespeichert fix

This commit is contained in:
Moritz Utcke
2025-03-19 11:30:09 -03:00
parent 8277eb100c
commit 915898c26f

View File

@@ -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."
})
}
}
})
},