2024-12-05 17:02:06 +00:00
|
|
|
import { getAPIDummy } from "./http-config/axiosCustom";
|
2025-01-01 17:48:57 +00:00
|
|
|
import { httpPost } from "./http-config/http-base-service";
|
2024-12-06 18:37:45 +00:00
|
|
|
import {
|
2025-01-01 17:48:57 +00:00
|
|
|
httpGetInterceptor,
|
2024-12-06 18:37:45 +00:00
|
|
|
httpGetInterceptorWithToken,
|
|
|
|
|
httpPostInterceptor,
|
|
|
|
|
} from "./http-config/http-interceptor-service";
|
2024-12-05 17:02:06 +00:00
|
|
|
|
2025-01-01 17:48:57 +00:00
|
|
|
export async function login(data: any) {
|
2024-12-06 18:37:45 +00:00
|
|
|
const pathUrl = "signin";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPost(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";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptorWithToken(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";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpGetInterceptor(url);
|
2024-12-26 11:29:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function setupPassword(data: any) {
|
|
|
|
|
const url = "setup-password";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-26 11:29:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export async function saveUser(data: any) {
|
|
|
|
|
const url = "users/save";
|
2025-01-01 17:48:57 +00:00
|
|
|
return httpPostInterceptor(url, data);
|
2024-12-26 11:29:22 +00:00
|
|
|
}
|
2024-12-05 17:02:06 +00:00
|
|
|
|