From 2f56673962e4b124c28dd38e28a575fbdfb9bf64 Mon Sep 17 00:00:00 2001 From: Henrriky Date: Tue, 12 Mar 2024 17:16:46 -0300 Subject: [PATCH] refactor: update name of functions link and unlink user right --- backend/src/controllers/IAMControllerEL.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/src/controllers/IAMControllerEL.ts b/backend/src/controllers/IAMControllerEL.ts index 19b4c51..e759acd 100644 --- a/backend/src/controllers/IAMControllerEL.ts +++ b/backend/src/controllers/IAMControllerEL.ts @@ -26,9 +26,9 @@ import { getSettingValue } from "../helpers/WhaticketSettings"; import { setBotInfo } from "../helpers/SetBotInfo"; import { logger } from "../utils/logger"; import ResetPasswordService from "../services/UserServices/ResetPassword"; -import LinkUserAndUserRightService from "../services/UserServices/LinkUserAndUserRight"; -import UnlinkUserAndUserRightService from "../services/UserServices/UnlinkUserAndUserRight"; import CheckUserRightService from "../services/UserServices/CheckUserRightService"; +import UnlinkUserRightService from "../services/UserServices/UnlinkUserRight"; +import LinkUserRightService from "../services/UserServices/LinkUserRight"; interface IAMResponse { return_code: string @@ -271,11 +271,11 @@ export const resetPassword = async (req: Request, res: Response): Promise => { +export const linkUserRight = async (req: Request, res: Response): Promise => { try { const { user_id, user_right_title, } = req.body; - await LinkUserAndUserRightService({ + await LinkUserRightService({ userProfile: user_right_title, userId: user_id }) @@ -303,11 +303,11 @@ export const linkUserAndUserRight = async (req: Request, res: Response): Promise => { +export const unlinkUserRight = async (req: Request, res: Response): Promise => { try { const { user_id, user_right_title } = req.body; - await UnlinkUserAndUserRightService({ + await UnlinkUserRightService({ userProfile: user_right_title, userId: user_id })