แก้ชื่อสิท
This commit is contained in:
parent
828dd2a37d
commit
ab138c2e04
23 changed files with 77 additions and 67 deletions
|
|
@ -65,7 +65,7 @@ export class ProfileChildrenController extends Controller {
|
|||
|
||||
@Post()
|
||||
public async newChildren(@Request() req: RequestWithUser, @Body() body: CreateProfileChildren) {
|
||||
await new permission().PermissionCreate(req,"SYS_REGISTRY");
|
||||
await new permission().PermissionCreate(req, "SYS_REGISTRY_OFFICER");
|
||||
const profile = await this.profileRepository.findOneBy({ id: body.profileId });
|
||||
|
||||
if (!profile) {
|
||||
|
|
@ -108,7 +108,7 @@ export class ProfileChildrenController extends Controller {
|
|||
@Body() body: UpdateProfileChildren,
|
||||
@Path() childrenId: string,
|
||||
) {
|
||||
await new permission().PermissionUpdate(req,"SYS_REGISTRY");
|
||||
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
|
||||
const record = await this.childrenRepository.findOneBy({ id: childrenId });
|
||||
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
|
||||
|
||||
|
|
@ -135,8 +135,8 @@ export class ProfileChildrenController extends Controller {
|
|||
}
|
||||
|
||||
@Delete("{childrenId}")
|
||||
public async deleteTraning(@Path() childrenId: string, @Request() req: RequestWithUser,) {
|
||||
await new permission().PermissionDelete(req,"SYS_REGISTRY");
|
||||
public async deleteTraning(@Path() childrenId: string, @Request() req: RequestWithUser) {
|
||||
await new permission().PermissionDelete(req, "SYS_REGISTRY_OFFICER");
|
||||
await this.childrenHistoryRepository.delete({
|
||||
profileChildrenId: childrenId,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue