แก้ SLR_018 , ลบ return id
This commit is contained in:
parent
1be7261ba0
commit
5f222498cb
6 changed files with 21 additions and 16 deletions
|
|
@ -84,7 +84,7 @@ export class SalaryRanksController extends Controller {
|
|||
// try {
|
||||
const salaryRank = await this.salaryRankRepository.findOne({ where: { id: id } });
|
||||
if (!salaryRank) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลไอดีนี้");
|
||||
}
|
||||
salaryRank.lastUpdateUserId = request.user.sub;
|
||||
salaryRank.lastUpdateFullName = request.user.name;
|
||||
|
|
@ -110,7 +110,7 @@ export class SalaryRanksController extends Controller {
|
|||
where: { id },
|
||||
});
|
||||
if (!delSalaryRanks) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้ : " + id);
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งตามไอดีนี้");
|
||||
}
|
||||
await this.salaryRankRepository.delete({ id: id });
|
||||
return new HttpSuccess();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue