Skip to content

Commit 643138f

Browse files
committed
update plugin setting
1 parent 496546c commit 643138f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/wechaty/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ async def get_plugin_setting() -> Response:
654654
return error(f'plugin<{name}> not exist ...')
655655
plugin: WechatyPlugin = self._plugins[name]
656656

657-
return success(plugin.setting)
657+
return success(plugin.setting.to_dict())
658658

659659
@app.route('/plugins/setting', methods=['POST', 'PUT'])
660660
async def update_plugin_setting() -> Response:

src/wechaty/utils/data_util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,7 @@ def __iter__(self) -> Iterator[_KT]:
7171
def __len__(self) -> int:
7272
"""get the length of dict data"""
7373
return len(self._dict_data)
74+
75+
def to_dict(self) -> dict:
76+
"""get the source dict data"""
77+
return self._dict_data

0 commit comments

Comments
 (0)