2024-12-26 11:29:22 +00:00
|
|
|
import {
|
|
|
|
|
getAPI,
|
|
|
|
|
getAPIInterceptor,
|
|
|
|
|
postAPI,
|
|
|
|
|
postAPIInterceptor,
|
|
|
|
|
postAPIWithJson,
|
|
|
|
|
} from "../config/api";
|
2024-12-05 17:02:06 +00:00
|
|
|
import { getAPIDummy } from "./http-config/axiosCustom";
|
|
|
|
|
|
2024-12-06 18:37:45 +00:00
|
|
|
import {
|
|
|
|
|
httpGetInterceptorWithToken,
|
|
|
|
|
httpPostInterceptor,
|
|
|
|
|
} from "./http-config/http-interceptor-service";
|
2024-12-05 17:02:06 +00:00
|
|
|
|
2024-12-06 18:37:45 +00:00
|
|
|
export async function setLogin(data: any) {
|
|
|
|
|
const pathUrl = "signin";
|
|
|
|
|
return postAPI(pathUrl, data);
|
2024-12-05 17:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-06 18:37:45 +00:00
|
|
|
export async function getProfile(token: any) {
|
|
|
|
|
const url = "users/info";
|
|
|
|
|
return getAPI(url, token);
|
2024-12-05 17:02:06 +00:00
|
|
|
}
|
|
|
|
|
|
2024-12-26 11:29:22 +00:00
|
|
|
export async function getInfoProfile() {
|
|
|
|
|
const url = "users/info";
|
|
|
|
|
return getAPIInterceptor(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function setupPassword(data: any) {
|
|
|
|
|
const url = "setup-password";
|
|
|
|
|
return postAPIInterceptor(url, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveUser(data: any) {
|
|
|
|
|
const url = "users/save";
|
|
|
|
|
return postAPIInterceptor(url, data);
|
|
|
|
|
}
|
2024-12-05 17:02:06 +00:00
|
|
|
|
2024-12-06 18:37:45 +00:00
|
|
|
export async function userInfo(token: any) {
|
|
|
|
|
const pathUrl = `users/info`;
|
|
|
|
|
return await httpGetInterceptorWithToken(pathUrl, token);
|
2024-12-05 17:02:06 +00:00
|
|
|
}
|