refactor: update name of functions link and unlink user right
parent
fca4dd7036
commit
2f56673962
|
@ -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<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 {
|
||||
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<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 {
|
||||
const { user_id, user_right_title } = req.body;
|
||||
|
||||
await UnlinkUserAndUserRightService({
|
||||
await UnlinkUserRightService({
|
||||
userProfile: user_right_title,
|
||||
userId: user_id
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue