core: validator: support 'convert' as default action

fix #505, close #506
This commit is contained in:
undefined committed 2023-02-05 13:07:46 +08:00
1 parent 02c0d7aaa8
commit 1124ed9506
7 files changed
+11 -9

No files matched your search

+2 -2
View File
@@ -385,12 +385,12 @@ export class ContestEditHandler extends Handler {
@param('pids', Types.Content)
@param('rated', Types.Boolean)
@param('code', Types.String, true)
@param('autoHide', Types.Boolean, true)
@param('autoHide', Types.Boolean)
@param('assign', Types.CommaSeperatedArray, true)
@param('lock', Types.UnsignedInt, true)
@param('contestDuration', Types.Float, true)
@param('maintainer', Types.NumericArray, true)
@param('allowViewCode', Types.Boolean, true)
@param('allowViewCode', Types.Boolean)
async postUpdate(
domainId: string, tid: ObjectID, beginAtDate: string, beginAtTime: string, duration: number,
title: string, content: string, rule: string, _pids: string, rated = false,
+1 -1
View File
@@ -358,7 +358,7 @@ class DiscussionRawHandler extends DiscussionHandler {
@param('drid', Types.ObjectID, true)
@param('drrid', Types.ObjectID, true)
@param('time', Types.UnsignedInt, true)
@param('all', Types.Boolean, true)
@param('all', Types.Boolean)
async get(domainId: string, did: ObjectID, drid: ObjectID, drrid: ObjectID, ts: number, all = false) {
if (all) {
this.response.body.history = await discussion.getHistory(domainId, drrid || drid || did);
+1 -1
View File
@@ -297,7 +297,7 @@ class SystemUserPrivHandler extends SystemHandler {
@requireSudo
@param('uid', Types.Int)
@param('priv', Types.UnsignedInt)
@param('system', Types.Boolean, true)
@param('system', Types.Boolean)
async post(domainId: string, uid: number, priv: number, editSystem: boolean) {
if (!editSystem) {
const udoc = await user.getById(domainId, uid);
+1 -1
View File
@@ -379,7 +379,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
}
@query('tid', Types.ObjectID, true)
@query('pjax', Types.Boolean, true)
@query('pjax', Types.Boolean)
async get(...args: any[]) {
// Navigate to current additional file download
// e.g. ![img](a.jpg) will navigate to ![img](./pid/file/a.jpg)
+1 -1
View File
@@ -32,7 +32,7 @@ class RecordListHandler extends ContestDetailBaseHandler {
@param('lang', Types.String, true)
@param('status', Types.Int, true)
@param('fullStatus', Types.Boolean)
@param('allDomain', Types.Boolean, true)
@param('allDomain', Types.Boolean)
async get(
domainId: string, page = 1, pid?: string | number, tid?: ObjectID,
uidOrName?: string, lang?: string, status?: number, full = false,