แก้ชื่อสิท

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

@ -72,7 +72,6 @@ export class ProfileCertificateController extends Controller {
return new HttpSuccess(record);
}
@Get("history/{certificateId}")
@Example({
status: 200,
@ -122,7 +121,7 @@ export class ProfileCertificateController extends Controller {
@Request() req: RequestWithUser,
@Body() body: CreateProfileCertificate,
) {
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");
}
@ -155,7 +154,7 @@ export class ProfileCertificateController extends Controller {
@Body() body: UpdateProfileCertificate,
@Path() certificateId: string,
) {
await new permission().PermissionUpdate(req,"SYS_REGISTRY");
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
const record = await this.certificateRepo.findOneBy({ id: certificateId });
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
@ -178,7 +177,7 @@ export class ProfileCertificateController extends Controller {
@Delete("{certificateId}")
public async deleteCertificate(@Path() certificateId: string, @Request() req: RequestWithUser) {
await new permission().PermissionDelete(req,"SYS_REGISTRY");
await new permission().PermissionDelete(req, "SYS_REGISTRY_OFFICER");
await this.certificateHistoryRepo.delete({
profileCertificateId: certificateId,
});