permission ทะเบียนประวัติขรก.+ลูกจ้าง
This commit is contained in:
parent
be7f719fd5
commit
9f5987d968
44 changed files with 191 additions and 75 deletions
|
|
@ -25,6 +25,7 @@ import {
|
|||
} from "../entities/ProfileFamilyCouple";
|
||||
import { ProfileFamilyCoupleHistory } from "../entities/ProfileFamilyCoupleHistory";
|
||||
import Extension from "../interfaces/extension";
|
||||
import permission from "../interfaces/permission";
|
||||
@Route("api/v1/org/profile/family/couple")
|
||||
@Tags("ProfileFamilyCouple")
|
||||
@Security("bearerAuth")
|
||||
|
|
@ -219,6 +220,7 @@ export class ProfileFamilyCoupleController extends Controller {
|
|||
@Request() req: RequestWithUser,
|
||||
@Body() body: CreateProfileFamilyCouple,
|
||||
) {
|
||||
await new permission().PermissionCreate(req,"SYS_REGISTRY");
|
||||
const familyCouple = Object.assign(new ProfileFamilyCouple(), body);
|
||||
if (!familyCouple) {
|
||||
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
|
@ -265,6 +267,7 @@ export class ProfileFamilyCoupleController extends Controller {
|
|||
@Body() body: UpdateProfileFamilyCouple,
|
||||
@Path() profileId: string,
|
||||
) {
|
||||
await new permission().PermissionUpdate(req,"SYS_REGISTRY");
|
||||
const familyCouple = await this.ProfileFamilyCouple.findOneBy({ profileId: profileId });
|
||||
if (!familyCouple) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue