fix Orgcontroller

This commit is contained in:
AdisakKanthawilang 2024-01-26 12:00:43 +07:00
parent aca680f4f4
commit 22324853db
4 changed files with 7 additions and 12 deletions

View file

@ -157,7 +157,7 @@ export class OrgChild2Controller extends Controller {
async delete(@Path() id: string) {
try {
const orgChild2 = await this.orgChild2Repository.findOne({ where: { id } });
const orgChild3 = await this.orgChild3Repository.findOne({ where: { id: id } });
const orgChild3 = await this.orgChild3Repository.findOne({ where: { orgChild2Id: id } });
if (!orgChild2) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูล");