permisstion ทะเบียนประวัติ(ที่ระบบอื่นๆ)
This commit is contained in:
parent
ff8917195f
commit
4bee31e74e
18 changed files with 496 additions and 5 deletions
|
|
@ -26,6 +26,31 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
return new HttpSuccess(lists);
|
||||
}
|
||||
|
||||
@Get("profileEmployeeId/{id}")
|
||||
async getProfile(@Path() id: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_TEMP", id);
|
||||
const profile = await this.profileRepository.findOne({
|
||||
select: ["id", "avatar", "avatarName"],
|
||||
where: { id },
|
||||
});
|
||||
|
||||
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
return new HttpSuccess(profile);
|
||||
}
|
||||
|
||||
@Get("profileEmployeeId-admin/{id}")
|
||||
async getProfileAdmin(@Path() id: string) {
|
||||
const profile = await this.profileRepository.findOne({
|
||||
select: ["id", "avatar", "avatarName"],
|
||||
where: { id },
|
||||
});
|
||||
|
||||
if (!profile) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
return new HttpSuccess(profile);
|
||||
}
|
||||
|
||||
@Get("select/{profileEmployeeId}/{id}")
|
||||
public async selectAvatarEmployee(
|
||||
@Path() profileEmployeeId: string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue