แก้ชื่อสิท

This commit is contained in:
JoolsoftAdmin 2024-08-13 10:25:58 +07:00
parent 828dd2a37d
commit ab138c2e04
23 changed files with 77 additions and 67 deletions

View file

@ -181,7 +181,7 @@ export class ProfileEducationsController extends Controller {
@Request() req: RequestWithUser,
@Body() body: CreateProfileEducation,
) {
await new permission().PermissionCreate(req,"SYS_REGISTRY");
await new permission().PermissionCreate(req, "SYS_REGISTRY_OFFICER");
if (!body.profileId) {
throw new HttpError(HttpStatus.BAD_REQUEST, "กรุณากรอก profileId");
}
@ -212,7 +212,7 @@ export class ProfileEducationsController extends Controller {
@Request() req: RequestWithUser,
@Path() educationId: string,
) {
await new permission().PermissionUpdate(req,"SYS_REGISTRY");
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
const record = await this.profileEducationRepo.findOneBy({ id: educationId });
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
@ -234,8 +234,11 @@ export class ProfileEducationsController extends Controller {
}
@Delete("{educationId}")
public async deleteProfileEducation(@Path() educationId: string, @Request() req: RequestWithUser) {
await new permission().PermissionDelete(req,"SYS_REGISTRY");
public async deleteProfileEducation(
@Path() educationId: string,
@Request() req: RequestWithUser,
) {
await new permission().PermissionDelete(req, "SYS_REGISTRY_OFFICER");
await this.profileEducationHistoryRepo.delete({
profileEducationId: educationId,
});