แก้ SLR_018 , ลบ return id
This commit is contained in:
parent
1be7261ba0
commit
5f222498cb
6 changed files with 21 additions and 16 deletions
|
|
@ -98,7 +98,7 @@ export class PosTypeController extends Controller {
|
|||
) {
|
||||
const posType = await this.posTypeRepository.findOne({ where: { id } });
|
||||
if (!posType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
const chkPosTypeName = await this.posTypeRepository.findOne({
|
||||
where: {
|
||||
|
|
@ -134,7 +134,7 @@ export class PosTypeController extends Controller {
|
|||
async deleteType(@Path() id: string) {
|
||||
const delPosType = await this.posTypeRepository.findOne({ where: { id } });
|
||||
if (!delPosType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
const IdExitsInLevel = await this.posLevelRepository.find({
|
||||
where: { posTypeId: id },
|
||||
|
|
@ -182,7 +182,7 @@ export class PosTypeController extends Controller {
|
|||
where: { id: id },
|
||||
});
|
||||
if (!getPosType) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
|
||||
const mapGetPosType = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue