a
This commit is contained in:
@ -6,7 +6,7 @@ COPY /app /app
|
||||
# COPY package-lock.json /app/package-lock.json
|
||||
|
||||
# Same as npm install
|
||||
# RUN npm ci
|
||||
RUN npm install
|
||||
|
||||
# COPY . /app
|
||||
#
|
||||
|
||||
@ -22,7 +22,7 @@ export const AuthProvider = ({ children }) => {
|
||||
const history = useNavigate();
|
||||
|
||||
const loginUser = async (username, password) => {
|
||||
const response = await fetch("http://127.0.0.1:8000/api/auth/token/", {
|
||||
const response = await fetch("http://127.0.0.1/api/auth/token/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@ -47,7 +47,7 @@ export const AuthProvider = ({ children }) => {
|
||||
};
|
||||
|
||||
const registerUser = async (username, password) => {
|
||||
const response = await fetch("http://127.0.0.1:8000/api/auth/register/", {
|
||||
const response = await fetch("http://127.0.0.1/api/auth/register/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
||||
@ -4,7 +4,7 @@ import dayjs from "dayjs";
|
||||
import { useContext } from "react";
|
||||
import AuthContext from "../context/AuthContext";
|
||||
|
||||
const baseURL = "http://127.0.0.1:8000/api/auth";
|
||||
const baseURL = "http://127.0.0.1/api/auth";
|
||||
|
||||
const useAxios = () => {
|
||||
const { authTokens, setUser, setAuthTokens } = useContext(AuthContext);
|
||||
|
||||
Reference in New Issue
Block a user