forked from noxious/server
a
This commit is contained in:
parent
37764847a9
commit
cc6f8d212e
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user