diff --git a/src/controllers/DevelopmentController.ts b/src/controllers/DevelopmentController.ts index 16d62bd..660ec50 100644 --- a/src/controllers/DevelopmentController.ts +++ b/src/controllers/DevelopmentController.ts @@ -141,7 +141,7 @@ export class DevelopmentController extends Controller { development.createdFullName = request.user.name; development.lastUpdateUserId = request.user.sub; development.lastUpdateFullName = request.user.name; - + await this.developmentRepository.save(development); return new HttpSuccess(development.id); } @@ -247,13 +247,13 @@ export class DevelopmentController extends Controller { break; } case 3: { - development.child4 = _null; - development.child4Id = _null; - development.child4ShortName = _null; + development.child4 = _null; + development.child4Id = _null; + development.child4ShortName = _null; break; } - default: - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรม"); + default: + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรม"); } await this.developmentRepository.save(development); return new HttpSuccess(development.id); diff --git a/src/interfaces/call-api.ts b/src/interfaces/call-api.ts index 8608230..4cbd1a5 100644 --- a/src/interfaces/call-api.ts +++ b/src/interfaces/call-api.ts @@ -21,7 +21,7 @@ class CallAPI { try { const response = await axios.get(url, { headers: { - Authorization: `Bearer ${token}`, + Authorization: `${token}`, "Content-Type": "application/json", }, }); @@ -37,7 +37,7 @@ class CallAPI { try { const response = await axios.post(url, sendData, { headers: { - Authorization: `Bearer ${token}`, + Authorization: `${token}`, "Content-Type": "application/json", }, });