Skip to content

Commit

Permalink
url change
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushchk committed Jul 24, 2024
1 parent c8b77aa commit bfda4bd
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/CourseDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CourseDetail: React.FC = () => {

useEffect(() => {
async function getCourses() {
const res = await axios.get("http://localhost:3001/admin/courses/", {
const res = await axios.get("http://api.alchemists.life/admin/courses/", {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand Down Expand Up @@ -140,7 +140,7 @@ function UpdateCourseCard({
async function handleUpdate(e: React.FormEvent) {
e.preventDefault();
await axios.put(
"http://localhost:3001/admin/courses/" + course._id,
"http://api.alchemists.life/admin/courses/" + course._id,
{
title: title,
description: description,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CreateCourse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const CreateCourse: React.FC = () => {
const handleAddCourse = async () => {
// e.preventDefault();
await axios.post(
"http://localhost:3001/admin/courses",
"http://api.alchemists.life/admin/courses",
{
title: title,
description: description,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Landing: React.FC = () => {
const token = localStorage.getItem("token");
if (token && token !== "null") {
try {
const res = await axios.get("http://localhost:3001/admin/me", {
const res = await axios.get("http://api.alchemists.life/admin/me", {
headers: {
Authorization: `Bearer ${token}`,
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Login: React.FC = () => {
const handleLogin = async (e: React.FormEvent) => {
e.preventDefault();
try {
const res = await axios.post("http://localhost:3001/admin/login", {
const res = await axios.post("http://api.alchemists.life/admin/login", {
username: email,
password: password,
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Navbar: React.FC = () => {
async function getAdminRouteMe() {
const token = localStorage.getItem("token");
if (token && token !== "null") {
const res = await axios.get("http://localhost:3001/admin/me", {
const res = await axios.get("http://api.alchemists.life", {
headers: {
Authorization: "Bearer " + token,
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Register: React.FC = () => {
e.preventDefault();

try {
const res = await axios.post("http://localhost:3001/admin/signup", {
const res = await axios.post("http://api.alchemists.life/admin/signup", {
username: email,
password: password,
});
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ShowCourses.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const ShowCourses: React.FC = () => {
const [courses, setCourses] = useRecoilState(coursesState);

async function getCourses() {
const res = await axios.get("http://localhost:3001/admin/courses/", {
const res = await axios.get("http://api.alchemists.life/admin/courses/", {
headers: {
Authorization: "Bearer " + localStorage.getItem("token"),
},
Expand Down

0 comments on commit bfda4bd

Please sign in to comment.