This commit is contained in:
parent
6486eff055
commit
78810b0425
1 changed files with 5 additions and 2 deletions
|
|
@ -66,10 +66,13 @@ export class KpiUserDevelopmentController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
const chkName = await this.kpiUserDevelopmentRepository.findOne({
|
const chkName = await this.kpiUserDevelopmentRepository.findOne({
|
||||||
where: { name: requestBody.name },
|
where: {
|
||||||
|
kpiUserEvaluationId: requestBody.kpiUserEvaluationId,
|
||||||
|
name: requestBody.name,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
if (chkName) {
|
if (chkName) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ชื่อหัวข้อนี้มีอยู่แล้ว");
|
||||||
}
|
}
|
||||||
|
|
||||||
const kpiUserDevelopment = Object.assign(new KpiUserDevelopment(), requestBody);
|
const kpiUserDevelopment = Object.assign(new KpiUserDevelopment(), requestBody);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue