import type { IauthenticationData } from "@/contexts/Types"; import { LOG } from "@logger"; import axiosRequest from "../axiosRequest"; const log = LOG.extend("authenticateUser"); const authenticateUser = async ({ username, password }: { username: string; password: string }) => { log.http({ username, password }); const response = await axiosRequest({ url: "/api/token/", method: "POST", data: { username: username, password: password, }, }); log.http(JSON.stringify(response, null, 2)); return response; }; export default authenticateUser;