Merge branch 'adiDev' into develop
This commit is contained in:
commit
74e64176e6
3 changed files with 32 additions and 5 deletions
|
|
@ -66,7 +66,6 @@ export class ProfileAbilityController extends Controller {
|
||||||
@Path() abilityId: string,
|
@Path() abilityId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
const _record = await this.profileAbilityRepo.findOne({
|
const _record = await this.profileAbilityRepo.findOne({
|
||||||
where: { id: abilityId },
|
where: { id: abilityId },
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
return new HttpSuccess(getProfileAbilityId);
|
return new HttpSuccess(getProfileAbilityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get("history/{abilityId}")
|
@Get("admin/history/{abilityId}")
|
||||||
public async getProfileAbilityHistory(
|
public async getProfileAdminAbilityHistory(
|
||||||
@Path() abilityId: string,
|
@Path() abilityId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
|
|
@ -87,6 +87,20 @@ export class ProfileAbilityEmployeeController extends Controller {
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get("history/{abilityId}")
|
||||||
|
public async getProfileAbilityHistory(
|
||||||
|
@Path() abilityId: string,
|
||||||
|
) {
|
||||||
|
const record = await this.profileAbilityHistoryRepo.find({
|
||||||
|
where: { profileAbilityId: abilityId },
|
||||||
|
order: { createdAt: "DESC" },
|
||||||
|
});
|
||||||
|
if (!record) {
|
||||||
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
|
}
|
||||||
|
return new HttpSuccess(record);
|
||||||
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
public async newProfileAbility(
|
public async newProfileAbility(
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,8 @@ export class ProfileAbilityEmployeeTempController extends Controller {
|
||||||
return new HttpSuccess(getProfileAbilityId);
|
return new HttpSuccess(getProfileAbilityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Get("history/{abilityId}")
|
@Get("admin/history/{abilityId}")
|
||||||
public async getProfileAbilityHistory(
|
public async getProfileAdminAbilityHistory(
|
||||||
@Path() abilityId: string,
|
@Path() abilityId: string,
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
) {
|
) {
|
||||||
|
|
@ -83,6 +83,20 @@ export class ProfileAbilityEmployeeTempController extends Controller {
|
||||||
return new HttpSuccess(record);
|
return new HttpSuccess(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Get("history/{abilityId}")
|
||||||
|
public async getProfileAbilityHistory(
|
||||||
|
@Path() abilityId: string,
|
||||||
|
) {
|
||||||
|
const record = await this.profileAbilityHistoryRepo.find({
|
||||||
|
where: { profileAbilityId: abilityId },
|
||||||
|
order: { createdAt: "DESC" },
|
||||||
|
});
|
||||||
|
if (!record) {
|
||||||
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||||
|
}
|
||||||
|
return new HttpSuccess(record);
|
||||||
|
}
|
||||||
|
|
||||||
@Post()
|
@Post()
|
||||||
public async newProfileAbility(
|
public async newProfileAbility(
|
||||||
@Request() req: RequestWithUser,
|
@Request() req: RequestWithUser,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue