mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
fix siteuserdata
This commit is contained in:
@@ -105,7 +105,7 @@ class SiteOper(DbOper):
|
||||
})
|
||||
return True, "更新站点RSS地址成功"
|
||||
|
||||
def update_userdata(self, domain: str, payload: dict) -> Tuple[bool, str]:
|
||||
def update_userdata(self, domain: str, name: str, payload: dict) -> Tuple[bool, str]:
|
||||
"""
|
||||
更新站点用户数据
|
||||
"""
|
||||
@@ -114,6 +114,7 @@ class SiteOper(DbOper):
|
||||
current_time = datetime.now().strftime('%H:%M:%S')
|
||||
payload.update({
|
||||
"domain": domain,
|
||||
"name": name,
|
||||
"updated_day": current_day,
|
||||
"updated_time": current_time
|
||||
})
|
||||
@@ -130,6 +131,12 @@ class SiteOper(DbOper):
|
||||
SiteUserData(**payload).create(self._db)
|
||||
return True, "更新站点用户数据成功"
|
||||
|
||||
def get_userdata(self) -> List[SiteUserData]:
|
||||
"""
|
||||
获取站点用户数据
|
||||
"""
|
||||
return SiteUserData.list(self._db)
|
||||
|
||||
def get_userdata_by_domain(self, domain: str, workdate: str = None) -> List[SiteUserData]:
|
||||
"""
|
||||
获取站点用户数据
|
||||
|
||||
Reference in New Issue
Block a user