ลบพัฒนา
This commit is contained in:
parent
16c3504f74
commit
8d62253a15
1 changed files with 2 additions and 0 deletions
|
|
@ -198,10 +198,12 @@ export class KpiUserDevelopmentController extends Controller {
|
|||
async deleteKpiUserDevelopment(@Path() id: string) {
|
||||
const delKpiUserDevelopment = await this.kpiUserDevelopmentRepository.findOne({
|
||||
where: { id },
|
||||
relations: ["developmentProjects"],
|
||||
});
|
||||
if (!delKpiUserDevelopment) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลพัฒนาตนเองนี้");
|
||||
}
|
||||
await this.developmentProjectRepository.remove(delKpiUserDevelopment.developmentProjects);
|
||||
await this.kpiUserDevelopmentRepository.remove(delKpiUserDevelopment);
|
||||
return new HttpSuccess();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue