pg-mvc-service 2.0.91 → 2.0.93
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.
- package/dist/Service.js +0 -4
- package/dist/models/TableModel.js +1 -1
- package/package.json +1 -1
- package/src/Service.ts +0 -5
- package/src/models/TableModel.ts +1 -1
package/dist/Service.js
CHANGED
|
@@ -200,10 +200,6 @@ class Service {
|
|
|
200
200
|
if (this.client !== undefined) {
|
|
201
201
|
yield this.client.release();
|
|
202
202
|
}
|
|
203
|
-
if (this.isTest) {
|
|
204
|
-
// In tests, the connection is terminated because it is shut down every time
|
|
205
|
-
yield this.Pool.end();
|
|
206
|
-
}
|
|
207
203
|
});
|
|
208
204
|
}
|
|
209
205
|
get S3Client() {
|
|
@@ -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
|
}
|
package/package.json
CHANGED
package/src/Service.ts
CHANGED
|
@@ -182,11 +182,6 @@ export class Service {
|
|
|
182
182
|
if (this.client !== undefined) {
|
|
183
183
|
await this.client.release();
|
|
184
184
|
}
|
|
185
|
-
|
|
186
|
-
if (this.isTest) {
|
|
187
|
-
// In tests, the connection is terminated because it is shut down every time
|
|
188
|
-
await this.Pool.end();
|
|
189
|
-
}
|
|
190
185
|
}
|
|
191
186
|
|
|
192
187
|
private s3Client?: AwsS3Client;
|
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
|
}
|