core: use Content/Name/Title to replace String

This commit is contained in:
undefined committed 2021-04-08 20:58:08 +08:00
1 parent 05968798fe
commit 2814bb51b9
15 files changed
+126 -117

No files matched your search

+3 -3
View File
@@ -102,8 +102,8 @@ class SystemScriptHandler extends SystemHandler {
this.response.body.path.push(['manage_script', null]);
}
@param('id', Types.String)
@param('args', Types.String, true)
@param('id', Types.Name)
@param('args', Types.Content, true)
async post(domainId: string, id: string, raw = '{}') {
if (!global.Hydro.script[id]) throw new ValidationError('id');
const args = JSON.parse(raw);
@@ -189,7 +189,7 @@ class SystemUserImportHandler extends SystemHandler {
this.response.template = 'manage_user_import.html';
}
@param('users', Types.String)
@param('users', Types.Content)
@param('draft', Types.Boolean)
async post(domainId: string, _users: string, draft: boolean) {
const users = _users.split('\n');