1
0
forked from noxious/server
This commit is contained in:
Dennis Postma 2024-07-07 20:58:02 +02:00
parent 37764847a9
commit cc6f8d212e

View File

@ -58,7 +58,6 @@ class ZoneRepository {
async update(id: number, name: string, width: number, height: number, tiles: string[][], objects: ZoneObject[]): Promise<Zone> {
try {
console.log(tiles);
return await prisma.zone.update({
where: {
id: id
@ -72,6 +71,7 @@ class ZoneRepository {
deleteMany: {
zoneId: id // Ensure only objects related to the zone are deleted
},
// Save new zone objects
create: objects.map(obj => ({
objectId: obj.objectId,
position_x: obj.position_x,