diff --git a/src/controllers/ProfileSalaryController.ts b/src/controllers/ProfileSalaryController.ts index 3b65100f..bd5be6c1 100644 --- a/src/controllers/ProfileSalaryController.ts +++ b/src/controllers/ProfileSalaryController.ts @@ -113,14 +113,14 @@ export class ProfileSalaryController extends Controller { /** * API GetById ProfileSalary * - * @summary GetById ProfileSalary + * @summary GetById Profile * - * @param {string} id Id ProfileSalaryId + * @param {string} id Id ProfileId */ @Get("{id}") async GetById(@Path() id: string) { - const profileSalary = await this.profileSalaryRepository.findOne({ - where: { id }, + const profileSalary = await this.profileSalaryRepository.find({ + where: { profileId:id }, select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"], }); if (!profileSalary) { @@ -129,22 +129,22 @@ export class ProfileSalaryController extends Controller { return new HttpSuccess(profileSalary); } - /** - * API GetLists profile salary - * - * @summary GetLists profile salary - * - */ - @Get() - async GetLists() { - const profileSalary = await this.profileSalaryRepository.find({ - select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"], + // /** + // * API GetLists profile salary + // * + // * @summary GetLists profile salary + // * + // */ + // @Get() + // async GetLists() { + // const profileSalary = await this.profileSalaryRepository.find({ + // select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"], // order: { createdAt: "ASC" }, - }); + // }); // if (!profileSalary) { // return new HttpSuccess([]); // } - return new HttpSuccess(profileSalary); - } + // return new HttpSuccess(profileSalary); + // } }