mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
测试:系统设置
This commit is contained in:
1 parent
747cb1b9b5
commit
0304cd808f
12 files changed
+147
-88
No files matched your search
+7
-10
@@ -139,18 +139,15 @@ class HomeSettingsHandler extends Handler {
|
||||
|
||||
async get({ category }) {
|
||||
this.response.template = 'home_settings.html';
|
||||
this.response.body = {
|
||||
category,
|
||||
page_name: `home_${category}`,
|
||||
current: this.user,
|
||||
};
|
||||
if (category === 'preference') {
|
||||
this.response.body = {
|
||||
category,
|
||||
page_name: `home_${category}`,
|
||||
settings: setting.PREFERENCE_SETTINGS,
|
||||
};
|
||||
this.response.body.settings = setting.PREFERENCE_SETTINGS;
|
||||
} else if (category === 'account') {
|
||||
this.response.body = {
|
||||
category,
|
||||
page_name: `home_${category}`,
|
||||
settings: setting.ACCOUNT_SETTINGS,
|
||||
};
|
||||
this.response.body.settings = setting.ACCOUNT_SETTINGS;
|
||||
} else throw new NotFoundError();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user