log 관련
This commit is contained in:
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const businessProperty = (params: BusinessPropertyParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 0,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<BusinessPropertyResponse>(API_URL_USER.businessProperty(), params),
|
||||
axios.post<BusinessPropertyResponse>(API_URL_USER.businessProperty(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const login = (params: LoginParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 0,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<LoginResponse>(API_URL.login(), params),
|
||||
axios.post<LoginResponse>(API_URL.login(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const shortcutDefault = (params: ShortcutDefaultParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 0,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<ShortcutDefaultResponse>(API_URL_USER.shortcutDefault(), params),
|
||||
axios.post<ShortcutDefaultResponse>(API_URL_USER.shortcutDefault(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const shortcutSave = (params: ShortcutSaveParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 0,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<ShortcutSaveResponse>(API_URL_USER.shortcutSave(), params),
|
||||
axios.post<ShortcutSaveResponse>(API_URL_USER.shortcutSave(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const shortcutUser = (params: ShortcutUserParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 0,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<ShortcutUserResponse>(API_URL_USER.shortcutUser(), params),
|
||||
axios.post<ShortcutUserResponse>(API_URL_USER.shortcutUser(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userChangeCancelPassword = (params: ChangeCancelPasswordParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 46,
|
||||
apiType: 'UPDATE'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<ChangeCancelPasswordResponse>(API_URL_USER.userChangeCancelPassword(), params),
|
||||
axios.post<ChangeCancelPasswordResponse>(API_URL_USER.userChangeCancelPassword(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userChangePassword = (params: ChangePasswordParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 46,
|
||||
apiType: 'UPDATE'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<ChangePasswordResponse>(API_URL_USER.changePassword(), params),
|
||||
axios.post<ChangePasswordResponse>(API_URL_USER.changePassword(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -23,10 +23,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userCreate = async (params: UserCreateParams): Promise<UserCreateMutationResponse> => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'INSERT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
try {
|
||||
const response = await axios.post<UserCreateResponse>(API_URL_USER.userCreate(), params);
|
||||
const response = await axios.post<UserCreateResponse>(API_URL_USER.userCreate(), params, options);
|
||||
return { status: true, data: response.data };
|
||||
} catch (error: any) {
|
||||
return {
|
||||
|
||||
@@ -9,8 +9,18 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userExistsUserid = (usrId: string) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserExistsUseridResponse>(API_URL_USER.userExistsUserid(usrId)),
|
||||
);
|
||||
|
||||
@@ -8,9 +8,19 @@ import {
|
||||
useQuery,
|
||||
UseQueryOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userExistsUserid = async (usrid: string) => {
|
||||
const response = await axios.post<UserExistsUseridResponse>(API_URL_USER.userExistsUserid(usrid));
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
const response = await axios.post<UserExistsUseridResponse>(API_URL_USER.userExistsUserid(usrid), options);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userFindAuthMethod = (params: UserFindAuthMethodParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserFindAuthMethodResponse>(API_URL_USER.findAuthMethod(), params),
|
||||
axios.post<UserFindAuthMethodResponse>(API_URL_USER.findAuthMethod(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userFind = (params: UserFindParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserFindResponse>(API_URL_USER.findUser(), params),
|
||||
axios.post<UserFindResponse>(API_URL_USER.findUser(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userMenuPermissions = (params: UserMenuPermissionsParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'SELECT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserMenuPermissionsResponse>(API_URL_USER.findMenuPermissions(), params),
|
||||
axios.post<UserMenuPermissionsResponse>(API_URL_USER.findMenuPermissions(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userMenuPermissionsSave = (params: UserMenuPermissionsSaveParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'INSERT'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserMenuPermissionsSaveResponse>(API_URL_USER.saveMenuPermissions(), params),
|
||||
axios.post<UserMenuPermissionsSaveResponse>(API_URL_USER.saveMenuPermissions(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userModifyAuthMethod = (params: UserModifyAuthMethodParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'UPDATE'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserModifyAuthMethodResponse>(API_URL_USER.modifyAuthMethod(), params),
|
||||
axios.post<UserModifyAuthMethodResponse>(API_URL_USER.modifyAuthMethod(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,10 +10,20 @@ import {
|
||||
useMutation,
|
||||
UseMutationOptions
|
||||
} from '@tanstack/react-query';
|
||||
import { getHeaderUserAgent } from '@/shared/constants/url';
|
||||
|
||||
export const userUpdatePermissions = (params: UserUpdatePermissionsParams) => {
|
||||
let headerOptions = {
|
||||
menuId: 45,
|
||||
apiType: 'UPDATE'
|
||||
};
|
||||
let options = {
|
||||
headers: {
|
||||
'X-User-Agent': getHeaderUserAgent(headerOptions)
|
||||
}
|
||||
};
|
||||
return resultify(
|
||||
axios.post<UserUpdatePermissionsResponse>(API_URL_USER.updatePermissions(), params),
|
||||
axios.post<UserUpdatePermissionsResponse>(API_URL_USER.updatePermissions(), params, options),
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user