Commit c43baa54 by G

function to hit the django authentication api

parent 0f26df78
import { IauthenticationData } from "@/contexts/Types";
import axiosRequest from "../axios-request";
const authenticateUser = async ({ username, password }: { username: string; password: string }) => {
return await axiosRequest<IauthenticationData>({
url: "/api/token/",
method: "POST",
data: {
username: username,
password: password,
},
});
};
export default authenticateUser;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment