pg-mvc-service 2.0.90 → 2.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -454,7 +454,7 @@ class TableModel {
|
|
|
454
454
|
const datas = yield this.clientQuery(sql, refValues);
|
|
455
455
|
if (datas.rows[0].count == "0") {
|
|
456
456
|
const name = ref.columns.map(col => { var _a; return (_a = this.getColumn(col.target).alias) !== null && _a !== void 0 ? _a : this.getColumn(col.target).columnName; }).join(',');
|
|
457
|
-
this.
|
|
457
|
+
this.throwUnprocessableException("007", this.errorMessages.fk.replace('{name}', name));
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
}
|
|
@@ -222,12 +222,12 @@ class RequestType extends ReqResType_1.default {
|
|
|
222
222
|
break;
|
|
223
223
|
case 'string':
|
|
224
224
|
case 'string?':
|
|
225
|
-
errorMessage = errorMessage.replace('{maxLength}',
|
|
225
|
+
errorMessage = errorMessage.replace('{maxLength}', ((_b = property.maxLength) !== null && _b !== void 0 ? _b : '[未指定]').toString());
|
|
226
226
|
break;
|
|
227
227
|
case 'number':
|
|
228
228
|
case 'number?':
|
|
229
|
-
errorMessage = errorMessage.replace('{max}',
|
|
230
|
-
errorMessage = errorMessage.replace('{min}',
|
|
229
|
+
errorMessage = errorMessage.replace('{max}', ((_c = property.max) !== null && _c !== void 0 ? _c : '[未指定]').toString());
|
|
230
|
+
errorMessage = errorMessage.replace('{min}', ((_d = property.min) !== null && _d !== void 0 ? _d : '[未指定]').toString());
|
|
231
231
|
break;
|
|
232
232
|
}
|
|
233
233
|
errorMessage = errorMessage.replace("{property}", keys.join('.')).replace("{value}", value);
|
package/package.json
CHANGED
package/src/models/TableModel.ts
CHANGED
|
@@ -534,7 +534,7 @@ export class TableModel {
|
|
|
534
534
|
const datas = await this.clientQuery(sql, refValues);
|
|
535
535
|
if (datas.rows[0].count == "0") {
|
|
536
536
|
const name = ref.columns.map(col => this.getColumn(col.target).alias ?? this.getColumn(col.target).columnName).join(',');
|
|
537
|
-
this.
|
|
537
|
+
this.throwUnprocessableException("007", this.errorMessages.fk.replace('{name}', name))
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
}
|
|
@@ -237,12 +237,12 @@ export class RequestType extends ReqResType {
|
|
|
237
237
|
break;
|
|
238
238
|
case 'string':
|
|
239
239
|
case 'string?':
|
|
240
|
-
errorMessage = errorMessage.replace('{maxLength}',
|
|
240
|
+
errorMessage = errorMessage.replace('{maxLength}', (property.maxLength ?? '[未指定]').toString());
|
|
241
241
|
break;
|
|
242
242
|
case 'number':
|
|
243
243
|
case 'number?':
|
|
244
|
-
errorMessage = errorMessage.replace('{max}',
|
|
245
|
-
errorMessage = errorMessage.replace('{min}',
|
|
244
|
+
errorMessage = errorMessage.replace('{max}', (property.max ?? '[未指定]').toString());
|
|
245
|
+
errorMessage = errorMessage.replace('{min}', (property.min ?? '[未指定]').toString());
|
|
246
246
|
break;
|
|
247
247
|
}
|
|
248
248
|
|