mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: use Content/Name/Title to replace String
This commit is contained in:
1 parent
05968798fe
commit
2814bb51b9
15 files changed
+126
-117
No files matched your search
@@ -50,7 +50,7 @@ export class ProblemSendHandler extends Handler {
|
||||
this.back();
|
||||
}
|
||||
|
||||
@post('token', Types.String)
|
||||
@post('token', Types.Content)
|
||||
async postInfo(domainId: string, tokenId: string) {
|
||||
const data = await token.get(tokenId, token.TYPE_EXPORT);
|
||||
if (!data) throw new InvalidTokenError(tokenId);
|
||||
@@ -60,7 +60,7 @@ export class ProblemSendHandler extends Handler {
|
||||
this.response.body = { pdocs: r, pids: data.pids };
|
||||
}
|
||||
|
||||
@post('token', Types.String, true)
|
||||
@post('token', Types.Content, true)
|
||||
@post('pids', Types.Array)
|
||||
async postFetch(domainId: string, tokenId: string, pids: number[]) {
|
||||
pids = pids.map((i) => (+i ? +i : i));
|
||||
|
||||
Reference in new issue
Block a user