This commit is contained in:
ollyhearn
2023-05-20 16:22:52 +03:00
parent 462a72e65f
commit bb225e5fb5
7 changed files with 33 additions and 7 deletions

View File

@ -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
#

View File

@ -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",

View File

@ -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);