แก้ error api key

This commit is contained in:
kittapath 2024-12-06 10:06:45 +07:00
parent e31e099ff3
commit 3b29da1c01

View file

@ -149,8 +149,8 @@ export class ApiKeyController extends Controller {
const apiName = await this.apiNameRepository.findOne({
where: { id: requestBody.apiNameId },
});
if (apiName)
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไท้พบรายการ Web Service นี้ในระบบ");
if (!apiName)
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบรายการ Web Service นี้ในระบบ");
}
const apiHistory = await AppDataSource.getRepository(ApiHistory)
.createQueryBuilder("apiHistory")