www.spaceplanner.app

Web client to the spaceplanner API
git clone git://jacobedwards.org/www.spaceplanner.app
Log | Files | Refs

commit 2e47d22b18925b20e653e24c34f216994c00d9ae
parent 677a4afe0c8ea6f79b3b124f5bbcfc5425261929
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue, 15 Oct 2024 15:17:55 -0700

Add pusherror callback

This is called when there is an error pushing updates to the server.

Diffstat:
Mfiles/floorplans/floorplan/backend.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/files/floorplans/floorplan/backend.js b/files/floorplans/floorplan/backend.js @@ -756,7 +756,7 @@ export class FloorplanBackend { }) .catch(function(err) { console.error("Unable to PATCH floorplan, trying PUT", err) - backend.putServer() + return backend.putServer() }) } @@ -777,6 +777,11 @@ export class FloorplanBackend { } updateIDs(backend, data) backend.serverPosition = backend.history.place + backend.cb("push") + }) + .catch(function(err) { + backend.cb("pusherror", err) + throw err }) }