diff --git a/src/Components/api/api.tsx b/src/Components/api/api.tsx index a559656..e69de29 100644 --- a/src/Components/api/api.tsx +++ b/src/Components/api/api.tsx @@ -1,21 +0,0 @@ -import axios from "axios"; -import { - LoginParams, -} from "../../Interfaces/Interfaces"; - -export function UserLogin(user: LoginParams) { - return axios - .post("http://localhost:8000/api/v1/accounts/token/login/", user) - .then(async (response) => { - localStorage.setItem("token", JSON.stringify(response.data.auth_token)); - console.log( - "Login Success! Stored Token: ", - JSON.parse(localStorage.getItem("token") || "{}") - ); - return true; - }) - .catch((error) => { - console.log("Login Failed: " + error); - return false; - }); - } \ No newline at end of file