role เมนู ข้าราชการ กทม. สามัญ
This commit is contained in:
parent
edad154826
commit
4b42b896fa
22 changed files with 307 additions and 157 deletions
|
|
@ -68,7 +68,8 @@ export class ProfileAddressController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("{profileId}")
|
||||
public async detailProfileAddress(@Path() profileId: string) {
|
||||
public async detailProfileAddress(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", profileId);
|
||||
const getProfileAddress = await this.profileRepo.findOne({
|
||||
where: { id: profileId },
|
||||
select: [
|
||||
|
|
@ -139,7 +140,8 @@ export class ProfileAddressController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("history/{profileId}")
|
||||
public async getProfileAddressHistory(@Path() profileId: string) {
|
||||
public async getProfileAddressHistory(@Path() profileId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionOrgUserGet(req, "SYS_REGISTRY_OFFICER", profileId);
|
||||
const record = await this.profileAddressHistoryRepo.find({
|
||||
where: { profileId: profileId },
|
||||
relations: {
|
||||
|
|
@ -182,7 +184,7 @@ export class ProfileAddressController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Path() profileId: string,
|
||||
) {
|
||||
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
|
||||
await new permission().PermissionOrgUserUpdate(req, "SYS_REGISTRY_OFFICER", profileId);
|
||||
const record = await this.profileRepo.findOneBy({ id: profileId });
|
||||
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue