แก้ชื่อ function
This commit is contained in:
parent
3b5096c005
commit
d26337caf3
1 changed files with 5 additions and 5 deletions
|
|
@ -35,7 +35,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
private salaryHistoryRepo = AppDataSource.getRepository(ProfileSalaryHistory);
|
||||
|
||||
@Get("{profileId}")
|
||||
public async getSalary(@Path() profileId: string) {
|
||||
public async getSalaryEmployee(@Path() profileId: string) {
|
||||
const record = await this.salaryRepo.find({
|
||||
where: { profileEmployeeId: profileId },
|
||||
order: { order: "ASC" },
|
||||
|
|
@ -52,7 +52,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
@Post()
|
||||
public async newSalary(
|
||||
public async newSalaryEmployee(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateProfileSalaryEmployee,
|
||||
) {
|
||||
|
|
@ -89,7 +89,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
@Patch("{salaryId}")
|
||||
public async editSalary(
|
||||
public async editSalaryEmployee(
|
||||
@Request() req: RequestWithUser,
|
||||
@Body() body: UpdateProfileSalaryEmployee,
|
||||
@Path() salaryId: string,
|
||||
|
|
@ -112,7 +112,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
@Delete("{salaryId}")
|
||||
public async deleteSalary(@Path() salaryId: string) {
|
||||
public async deleteSalaryEmployee(@Path() salaryId: string) {
|
||||
await this.salaryHistoryRepo.delete({
|
||||
profileSalaryId: salaryId,
|
||||
});
|
||||
|
|
@ -127,7 +127,7 @@ export class ProfileSalaryEmployeeController extends Controller {
|
|||
}
|
||||
|
||||
@Get("swap/{direction}/{salaryId}")
|
||||
public async swapSalary(@Path() direction: string, salaryId: string) {
|
||||
public async swapSalaryEmployee(@Path() direction: string, salaryId: string) {
|
||||
const source_item = await this.salaryRepo.findOne({ where: { id: salaryId } });
|
||||
if (source_item == null) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
const sourceOrder = source_item.order;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue