xce009 commited on
Commit
8ee0135
·
1 Parent(s): 5c8183d

fix: correct maintenance route paths in middleware and deploy.py

Browse files
Files changed (2) hide show
  1. app/api/server.py +1 -1
  2. deploy.py +1 -1
app/api/server.py CHANGED
@@ -109,7 +109,7 @@ def create_application() -> FastAPI:
109
  method = request.method
110
  path = request.url.path
111
  if method not in ("GET", "HEAD", "OPTIONS"):
112
- if not path.startswith("/api/v1/system/maintenance"):
113
  if method == "POST" and path.startswith("/api/v1/backup"):
114
  pass # allow backup/restore during maintenance
115
  else:
 
109
  method = request.method
110
  path = request.url.path
111
  if method not in ("GET", "HEAD", "OPTIONS"):
112
+ if not path.startswith("/api/v1/maintenance"):
113
  if method == "POST" and path.startswith("/api/v1/backup"):
114
  pass # allow backup/restore during maintenance
115
  else:
deploy.py CHANGED
@@ -585,7 +585,7 @@ def run_deployment(args: argparse.Namespace, env: dict[str, str]) -> int:
585
  audit.set("backup_status", "skipped")
586
  else:
587
  # Enable maintenance mode to freeze data state
588
- maint_url = _build_url(space_url, "/api/v1/system/maintenance/enable")
589
  maint_enabled = False
590
  try:
591
  status = http_post_json(maint_url, auth_headers, timeout=15)
 
585
  audit.set("backup_status", "skipped")
586
  else:
587
  # Enable maintenance mode to freeze data state
588
+ maint_url = _build_url(space_url, "/api/v1/maintenance/enable")
589
  maint_enabled = False
590
  try:
591
  status = http_post_json(maint_url, auth_headers, timeout=15)