diff options
author | Kyomotoi <[email protected]> | 2023-01-06 17:09:12 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2023-01-06 17:09:12 +0800 |
commit | cbaa309976b8973124c7d66fbe3d50b970727905 (patch) | |
tree | 4548232992f0b7549d3fc513859efa099474690a /ATRI/plugins/console/driver | |
parent | 0ae2001ff6c50ed85fe970da8fbfc577a70488d5 (diff) | |
download | ATRI-cbaa309976b8973124c7d66fbe3d50b970727905.tar.gz ATRI-cbaa309976b8973124c7d66fbe3d50b970727905.tar.bz2 ATRI-cbaa309976b8973124c7d66fbe3d50b970727905.zip |
🎨 优化代码
Diffstat (limited to 'ATRI/plugins/console/driver')
-rw-r--r-- | ATRI/plugins/console/driver/data_source.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ATRI/plugins/console/driver/data_source.py b/ATRI/plugins/console/driver/data_source.py index 12fb938..45b07e6 100644 --- a/ATRI/plugins/console/driver/data_source.py +++ b/ATRI/plugins/console/driver/data_source.py @@ -87,7 +87,7 @@ def get_service_list() -> dict: def edit_service( service: str, global_enabled: int, enabled: bool, user_id: str, group_id: str ): - data = ServiceTools.load_service(service) + data = ServiceTools(service).load_service() if global_enabled != 2 and global_enabled: data.enabled = bool(global_enabled) @@ -115,7 +115,7 @@ def edit_service( else: return {"detail": "群已存在于禁用名单"} - ServiceTools.save_service(data.dict(), service) + ServiceTools(service).save_service(data.dict()) return {"detail": "操作完成~"} |