feat(mutator): update_decky payload accepts top-level services list
apply_update_decky only merged payload.patch into decky_config. Since services is a separate DB column, there was no way to replace a decky's services list via a mutation. Add a top-level services key to the op payload that maps straight onto the services column. Unblocks the MazeNET editor routing service-add/service-drop actions through the mutation queue on active topologies.
This commit is contained in:
@@ -280,6 +280,7 @@ async def apply_update_decky(
|
||||
``payload`` keys:
|
||||
``decky`` — decky name.
|
||||
``patch`` — dict merged into existing ``decky_config``.
|
||||
``services`` — replacement top-level services list.
|
||||
``x``,``y`` — layout coords.
|
||||
"""
|
||||
hydrated = await _hydrated(repo, topology_id)
|
||||
@@ -291,6 +292,8 @@ async def apply_update_decky(
|
||||
merged = dict(decky["decky_config"])
|
||||
merged.update(payload["patch"])
|
||||
patch["decky_config"] = merged
|
||||
if "services" in payload:
|
||||
patch["services"] = list(payload["services"])
|
||||
for key in ("x", "y"):
|
||||
if key in payload:
|
||||
patch[key] = payload[key]
|
||||
|
||||
Reference in New Issue
Block a user