fix: make app private when created

This commit is contained in:
GareArc
2025-04-10 00:36:35 -04:00
parent cbea30e65f
commit b922c8c215
2 changed files with 28 additions and 3 deletions

View File

@ -42,3 +42,19 @@ class EnterpriseService:
if not data:
raise ValueError("No data found.")
return WebAppSettings(**data)
@classmethod
def update_app_access_mode(cls, app_id: str, access_mode: str) -> bool:
if not app_id:
raise ValueError("app_id must be provided.")
if access_mode not in ["public", "private", "private_all"]:
raise ValueError("access_mode must be either 'public', 'private', or 'private_all'")
data = {
"appId": app_id,
"accessMode": access_mode
}
response = EnterpriseRequest.send_request("POST", "/webapp/access-mode", json=data)
return response.get("result", False)