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

+2 -2
View File
@@ -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));