import { axiosInstance } from "@/axios";
import type { LoginPayload, Token, UserData } from "./types";

export const login = (data: LoginPayload) => {
	return axiosInstance.post<Token>("/login/token/", data);
};

// On this one you just provide the bear token and its should return the userData.
export const getUserData = () => {
	return axiosInstance.get<UserData>("/user-info/");
};
