refactor: update name of functions link and unlink user right

feat-scaling-ticket-remote-creation
Henrriky 2024-03-12 17:16:46 -03:00
parent fca4dd7036
commit 2f56673962
1 changed files with 6 additions and 6 deletions

View File

@ -26,9 +26,9 @@ import { getSettingValue } from "../helpers/WhaticketSettings";
import { setBotInfo } from "../helpers/SetBotInfo"; import { setBotInfo } from "../helpers/SetBotInfo";
import { logger } from "../utils/logger"; import { logger } from "../utils/logger";
import ResetPasswordService from "../services/UserServices/ResetPassword"; 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 CheckUserRightService from "../services/UserServices/CheckUserRightService";
import UnlinkUserRightService from "../services/UserServices/UnlinkUserRight";
import LinkUserRightService from "../services/UserServices/LinkUserRight";
interface IAMResponse { interface IAMResponse {
return_code: string return_code: string
@ -271,11 +271,11 @@ export const resetPassword = async (req: Request, res: Response<IAMResponse & {
}; };
export const linkUserAndUserRight = async (req: Request, res: Response<IAMResponse & { user_right_linked: "1" | "0" }>): Promise<Response> => { export const linkUserRight = async (req: Request, res: Response<IAMResponse & { user_right_linked: "1" | "0" }>): Promise<Response> => {
try { try {
const { user_id, user_right_title, } = req.body; const { user_id, user_right_title, } = req.body;
await LinkUserAndUserRightService({ await LinkUserRightService({
userProfile: user_right_title, userProfile: user_right_title,
userId: user_id userId: user_id
}) })
@ -303,11 +303,11 @@ export const linkUserAndUserRight = async (req: Request, res: Response<IAMRespon
} }
}; };
export const unlinkUserAndUserRight = async (req: Request, res: Response<IAMResponse & { user_right_unlinked: "1" | "0" }>): Promise<Response> => { export const unlinkUserRight = async (req: Request, res: Response<IAMResponse & { user_right_unlinked: "1" | "0" }>): Promise<Response> => {
try { try {
const { user_id, user_right_title } = req.body; const { user_id, user_right_title } = req.body;
await UnlinkUserAndUserRightService({ await UnlinkUserRightService({
userProfile: user_right_title, userProfile: user_right_title,
userId: user_id userId: user_id
}) })