fix media update

This commit is contained in:
lesion
2023-06-12 20:21:56 +02:00
parent 01dbb1b2d7
commit 9ce9a1aad9
+1 -3
View File
@@ -454,9 +454,7 @@ const eventController = {
}]
} else if (!body.image) {
eventDetails.media = []
}
if (body.image_focalpoint && event.media.length) {
} else if (body.image_focalpoint && event.media.length) {
let focalpoint = body.image_focalpoint ? body.image_focalpoint.split(',') : ['0', '0']
focalpoint = [parseFloat(parseFloat(focalpoint[0]).toFixed(2)), parseFloat(parseFloat(focalpoint[1]).toFixed(2))]
eventDetails.media = [{ ...event.media[0], focalpoint }] // [0].focalpoint = focalpoint