fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
52
backend/node_modules/express-validator/lib/chain/context-handler-impl.js
generated
vendored
Normal file
52
backend/node_modules/express-validator/lib/chain/context-handler-impl.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ContextHandlerImpl = void 0;
|
||||
const context_items_1 = require("../context-items");
|
||||
const bail_1 = require("../context-items/bail");
|
||||
class ContextHandlerImpl {
|
||||
constructor(builder, chain) {
|
||||
this.builder = builder;
|
||||
this.chain = chain;
|
||||
}
|
||||
bail(opts) {
|
||||
if (opts?.level === 'request') {
|
||||
this.builder.setRequestBail();
|
||||
}
|
||||
this.builder.addItem(new bail_1.Bail());
|
||||
return this.chain;
|
||||
}
|
||||
if(condition) {
|
||||
if ('run' in condition) {
|
||||
this.builder.addItem(new context_items_1.ChainCondition(condition));
|
||||
}
|
||||
else if (typeof condition === 'function') {
|
||||
this.builder.addItem(new context_items_1.CustomCondition(condition));
|
||||
}
|
||||
else {
|
||||
throw new Error('express-validator: condition is not a validation chain nor a function');
|
||||
}
|
||||
return this.chain;
|
||||
}
|
||||
optional(options = true) {
|
||||
let value;
|
||||
if (typeof options === 'boolean') {
|
||||
value = options ? 'undefined' : false;
|
||||
}
|
||||
else {
|
||||
value = options.values
|
||||
? options.values
|
||||
: options.checkFalsy
|
||||
? 'falsy'
|
||||
: options.nullable
|
||||
? 'null'
|
||||
: 'undefined';
|
||||
}
|
||||
this.builder.setOptional(value);
|
||||
return this.chain;
|
||||
}
|
||||
hide(hiddenValue) {
|
||||
this.builder.setHidden(true, hiddenValue);
|
||||
return this.chain;
|
||||
}
|
||||
}
|
||||
exports.ContextHandlerImpl = ContextHandlerImpl;
|
||||
Reference in New Issue
Block a user