แก้apiยิงไปข้างนอก

This commit is contained in:
Kittapath 2024-04-18 15:57:03 +07:00
parent afc42b743e
commit 109bea3fc8
2 changed files with 8 additions and 8 deletions

View file

@ -247,13 +247,13 @@ export class DevelopmentController extends Controller {
break; break;
} }
case 3: { case 3: {
development.child4 = _null; development.child4 = _null;
development.child4Id = _null; development.child4Id = _null;
development.child4ShortName = _null; development.child4ShortName = _null;
break; break;
} }
default: default:
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรม"); throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลโครงการ/หลักสูตรการฝึกอบรม");
} }
await this.developmentRepository.save(development); await this.developmentRepository.save(development);
return new HttpSuccess(development.id); return new HttpSuccess(development.id);

View file

@ -21,7 +21,7 @@ class CallAPI {
try { try {
const response = await axios.get(url, { const response = await axios.get(url, {
headers: { headers: {
Authorization: `Bearer ${token}`, Authorization: `${token}`,
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}); });
@ -37,7 +37,7 @@ class CallAPI {
try { try {
const response = await axios.post(url, sendData, { const response = await axios.post(url, sendData, {
headers: { headers: {
Authorization: `Bearer ${token}`, Authorization: `${token}`,
"Content-Type": "application/json", "Content-Type": "application/json",
}, },
}); });