แก้ชื่อสิท

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

@ -96,7 +96,7 @@ export class ProfileNopaidController extends Controller {
@Post()
public async newNopaid(@Request() req: RequestWithUser, @Body() body: CreateProfileNopaid) {
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");
}
@ -129,7 +129,7 @@ export class ProfileNopaidController extends Controller {
@Body() body: UpdateProfileNopaid,
@Path() nopaidId: string,
) {
await new permission().PermissionUpdate(req,"SYS_REGISTRY");
await new permission().PermissionUpdate(req, "SYS_REGISTRY_OFFICER");
const record = await this.nopaidRepository.findOneBy({ id: nopaidId });
if (!record) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล");
@ -152,7 +152,7 @@ export class ProfileNopaidController extends Controller {
@Delete("{nopaidId}")
public async deleteNopaid(@Path() nopaidId: string, @Request() req: RequestWithUser) {
await new permission().PermissionDelete(req,"SYS_REGISTRY");
await new permission().PermissionDelete(req, "SYS_REGISTRY_OFFICER");
await this.nopaidHistoryRepository.delete({
profileNopaidId: nopaidId,
});