This commit is contained in:
jxxghp
2023-06-14 17:04:52 +08:00
parent c726864412
commit 8cbc33a976
4 changed files with 49 additions and 10 deletions

View File

@ -49,6 +49,14 @@ class Sites:
"""
return Site.delete(self._db, sid)
def update(self, sid: int, payload: dict):
"""
更新站点
"""
site = Site.get(self._db, sid)
site.update(self._db, payload)
return site
def get_by_domain(self, domain: str) -> Site:
"""
按域名获取站点