mirror of
https://github.com/AbaTekNTNU/followspot-psn.git
synced 2026-11-13 00:32:13 +00:00
update clients after trackers are updated
This commit is contained in:
1 parent
7a347ed246
commit
6e7dd7a560
1 file changed
+4
@@ -257,6 +257,8 @@ async def handle_add_tracker(request):
|
|||||||
return web.Response(text="Tracker already exists", status=400)
|
return web.Response(text="Tracker already exists", status=400)
|
||||||
|
|
||||||
trackers[tracker_id] = TrackerData(tracker_id, *START_POSITION_INTERNAL)
|
trackers[tracker_id] = TrackerData(tracker_id, *START_POSITION_INTERNAL)
|
||||||
|
await update_all_clients(request.app)
|
||||||
|
|
||||||
return web.Response(text="OK", status=200)
|
return web.Response(text="OK", status=200)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return web.Response(text=f"Error: {e}", status=400)
|
return web.Response(text=f"Error: {e}", status=400)
|
||||||
@@ -273,6 +275,8 @@ async def handler_delete_tracker(request):
|
|||||||
return web.Response(text="Tracker does not exist", status=400)
|
return web.Response(text="Tracker does not exist", status=400)
|
||||||
|
|
||||||
del trackers[tracker_id]
|
del trackers[tracker_id]
|
||||||
|
await update_all_clients(request.app)
|
||||||
|
|
||||||
return web.Response(text="OK", status=200)
|
return web.Response(text="OK", status=200)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return web.Response(text=f"Error: {e}", status=400)
|
return web.Response(text=f"Error: {e}", status=400)
|
||||||
|
|||||||
Reference in new issue
Block a user