From 4468704f57fb92027b1e46dfc7f2af4502c72428 Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 16 Aug 2024 11:44:08 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=8A?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=95=E0=B8=B1=E0=B8=A7=E0=B9=81?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=20method=20=3D>=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/PermissionController.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/controllers/PermissionController.ts b/src/controllers/PermissionController.ts index e1c7d5d4..625520a0 100644 --- a/src/controllers/PermissionController.ts +++ b/src/controllers/PermissionController.ts @@ -192,21 +192,21 @@ export class PermissionController extends Controller { /** * API permission (dotnet api) * @summary permission (dotnet api) - * @param {string} method Method + * @param {string} action action * @param {string} system authSysId */ - @Get("dotnet/{method}/{system}") + @Get("dotnet/{action}/{system}") public async dotnet( @Request() req: RequestWithUser, - @Path() method: string, + @Path() action: string, @Path() system: string ) { - if(!["CREATE", "DELETE", "GET", "LIST", "UPDATE"].includes(method)) { - throw new HttpError(HttpStatus.NOT_FOUND, "Method ไม่ถูกต้อง"); + if(!["CREATE", "DELETE", "GET", "LIST", "UPDATE"].includes(action)) { + throw new HttpError(HttpStatus.NOT_FOUND, "Action ไม่ถูกต้อง"); } - let res = await new permission().Permission(req, system.toLocaleUpperCase(), method); + let res = await new permission().Permission(req, system.toLocaleUpperCase(), action); return new HttpSuccess(res); } }