add 站点管理命令
This commit is contained in:
@ -25,6 +25,12 @@ class Sites:
|
||||
return True, "新增站点成功"
|
||||
return False, "站点已存在"
|
||||
|
||||
def get(self, sid: int):
|
||||
"""
|
||||
查询单个站点
|
||||
"""
|
||||
return Site.get(self._db, sid)
|
||||
|
||||
def list(self) -> List[Site]:
|
||||
"""
|
||||
获取站点列表
|
||||
@ -37,6 +43,12 @@ class Sites:
|
||||
"""
|
||||
return Site.get_actives(self._db)
|
||||
|
||||
def delete(self, sid: int):
|
||||
"""
|
||||
删除站点
|
||||
"""
|
||||
return Site.delete(self._db, sid)
|
||||
|
||||
def get_by_domain(self, domain: str) -> Site:
|
||||
"""
|
||||
按域名获取站点
|
||||
|
Reference in New Issue
Block a user