Skip to content

Commit

Permalink
fixed port issue
Browse files Browse the repository at this point in the history
  • Loading branch information
parkersarahl committed Jul 10, 2024
1 parent 4f14f3d commit 7f597bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function App() {

useEffect(() => {
console.log("HOST", hosts);
axios.get(`http://${hosts}:3000/api/todos`).then((response) => {
axios.get(`http://${hosts}/api/todos`).then((response) => {
setTodos(response.data);
});
}, []);
Expand All @@ -43,7 +43,7 @@ function App() {
};

const addTodo = () => {
axios.post(`http://${hosts}:3000/api/todos`, newTodo).then((response) => {
axios.post(`http://${hosts}/api/todos`, newTodo).then((response) => {
setTodos(response.data);
});
};
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Todo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Todo = ({ todo, updateTodos }: Props) => {
const editTodo = (key: string, value: string | boolean) => {
const updatedTodo = { ...todo, [key]: value };
axios
.put(`http://${hosts}:3000/api/todos/${todo.id}`, {
.put(`http://${hosts}/api/todos/${todo.id}`, {
todo: updatedTodo,
})
.then((response) => {
Expand Down

0 comments on commit 7f597bf

Please sign in to comment.