mediahub-fe/service/login-services.ts

20 lines
564 B
TypeScript

import { getAPI, getAPIInterceptor } from "@/config/api";
import { httpGet, httpPost } from "./http-config/http-base-service";
import {
httpGetInterceptor,
httpGetInterceptorWithToken,
} from "./http-config/http-interceptor-service";
export async function login(data: any) {
const pathUrl = `signin`;
const headers = {
"content-type": "application/json",
};
return await httpPost(pathUrl, headers, data);
}
export async function userInfo(token: any) {
const pathUrl = `users/info`;
return await httpGetInterceptorWithToken(pathUrl, token);
}