แก้ SLR_018 , ลบ return id
This commit is contained in:
parent
1be7261ba0
commit
5f222498cb
6 changed files with 21 additions and 16 deletions
|
|
@ -122,7 +122,7 @@ export class PosLevelController extends Controller {
|
|||
) {
|
||||
const posLevel = await this.posLevelRepository.findOne({ where: { id } });
|
||||
if (!posLevel) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
|
||||
const chkPosTypeId = await this.posTypeRepository.findOne({
|
||||
|
|
@ -180,7 +180,7 @@ export class PosLevelController extends Controller {
|
|||
async deleteLevel(@Path() id: string) {
|
||||
const delPosLevel = await this.posLevelRepository.findOne({ where: { id } });
|
||||
if (!delPosLevel) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
// try {
|
||||
await this.posLevelRepository.remove(delPosLevel);
|
||||
|
|
@ -217,7 +217,7 @@ export class PosLevelController extends Controller {
|
|||
where: { id: id },
|
||||
});
|
||||
if (!getPosType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
|
||||
const mapPosLevel = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue