Feat/webapp verified sso main (#20494)

This commit is contained in:
Xiyuan Chen 2025-06-09 17:19:53 +09:00 • committed by GitHub
commit 0720bc7408
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 504 additions and 75 deletions

View file

@ -395,3 +395,15 @@ class AppService:
if not site:
raise ValueError(f"App with id {app_id} not found")
return str(site.code)
@staticmethod
def get_app_id_by_code(app_code: str) -> str:
"""
Get app id by app code
:param app_code: app code
:return: app id
"""
site = db.session.query(Site).filter(Site.code == app_code).first()
if not site:
raise ValueError(f"App with code {app_code} not found")
return str(site.app_id)