role เมนู ลูกจ้างชั่วคราว
This commit is contained in:
parent
6f053d2c70
commit
877a70ef3d
22 changed files with 109 additions and 63 deletions
|
|
@ -15,7 +15,8 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
private avatarRepository = AppDataSource.getRepository(ProfileAvatar);
|
||||
|
||||
@Get("{profileEmployeeId}")
|
||||
public async getAvatarEmployee(@Path() profileEmployeeId: string) {
|
||||
public async getAvatarEmployee(@Path() profileEmployeeId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionList(req, "SYS_REGISTRY_TEMP");
|
||||
const lists = await this.avatarRepository.find({
|
||||
where: { profileEmployeeId },
|
||||
});
|
||||
|
|
@ -23,7 +24,8 @@ export class ProfileAvatarEmployeeTempController extends Controller {
|
|||
}
|
||||
|
||||
@Get("select/{profileEmployeeId}/{id}")
|
||||
public async selectAvatarEmployee(@Path() profileEmployeeId: string, @Path() id: string) {
|
||||
public async selectAvatarEmployee(@Path() profileEmployeeId: string, @Path() id: string, @Request() req: RequestWithUser) {
|
||||
// await new permission().PermissionGet(req, "SYS_REGISTRY_TEMP");//ตสTEMP
|
||||
const result = await this.avatarRepository.findOneBy({ id: id });
|
||||
if (!result) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue