aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/ui
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/ui')
-rw-r--r--packages/meshbay-node/src/meshbay_node/ui/app.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/ui/app.py b/packages/meshbay-node/src/meshbay_node/ui/app.py
index 9b9307d..4ad3787 100644
--- a/packages/meshbay-node/src/meshbay_node/ui/app.py
+++ b/packages/meshbay-node/src/meshbay_node/ui/app.py
@@ -515,4 +515,14 @@ def create_ui_app(state: dict) -> FastAPI:
async def get_transfers():
return await _op(lambda: ops.list_transfers(state))
+ @app.put("/api/groups/{group_id}/transfer-limits")
+ async def set_transfer_limits(group_id: str, payload: dict):
+ # The same `ops.set_transfer_limits` the signed MNP handler calls. The
+ # op existed with only that one door, and nothing anywhere opened it —
+ # so the per-member cap sat at its default of 2 with no way to change
+ # it, which from outside is indistinguishable from a hardcoded 2.
+ return await _op(lambda: ops.set_transfer_limits(
+ state, group_id,
+ int(payload.get("downloads", 0)), int(payload.get("uploads", 0))))
+
return app