From cbaa309976b8973124c7d66fbe3d50b970727905 Mon Sep 17 00:00:00 2001 From: Kyomotoi <0w0@imki.moe> Date: Fri, 6 Jan 2023 17:09:12 +0800 Subject: =?UTF-8?q?=F0=9F=8E=A8=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/plugins/manage/data_source.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ATRI/plugins/manage') diff --git a/ATRI/plugins/manage/data_source.py b/ATRI/plugins/manage/data_source.py index e015805..ff344e7 100644 --- a/ATRI/plugins/manage/data_source.py +++ b/ATRI/plugins/manage/data_source.py @@ -144,11 +144,11 @@ class Manage: Only SUPERUSER. """ try: - data = ServiceTools().load_service(service) + data = ServiceTools(service).load_service() except Exception: return False data.enabled = is_enabled - ServiceTools().save_service(data.dict(), service) + ServiceTools(service).save_service(data.dict()) return True @staticmethod @@ -157,7 +157,7 @@ class Manage: Only SUPERUSER. """ try: - data = ServiceTools().load_service(service) + data = ServiceTools(service).load_service() except Exception: return False temp_list: list = data.disable_user @@ -174,7 +174,7 @@ class Manage: temp_list.append(user_id) data.disable_user = temp_list - ServiceTools().save_service(data.dict(), service) + ServiceTools(service).save_service(data.dict()) return True @staticmethod @@ -184,7 +184,7 @@ class Manage: Only current group. """ try: - data = ServiceTools().load_service(service) + data = ServiceTools(service).load_service() except Exception: return False temp_list: list = data.disable_group @@ -201,7 +201,7 @@ class Manage: temp_list.append(group_id) data.disable_group = temp_list - ServiceTools().save_service(data.dict(), service) + ServiceTools(service).save_service(data.dict()) return True @staticmethod -- cgit v1.2.3