From 63acad675f5a4e2720b1756ed4e79995b05941f4 Mon Sep 17 00:00:00 2001
From: syn <isaqtm@gmail.com>
Date: Tue, 16 Mar 2021 22:43:55 +0300
Subject: Change api endpoints

---
 front/index.jsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'front/index.jsx')

diff --git a/front/index.jsx b/front/index.jsx
index 85b1977..9e6670d 100644
--- a/front/index.jsx
+++ b/front/index.jsx
@@ -38,7 +38,7 @@ class TodoList extends Component {
     }
 
     componentWillMount() {
-        get("/todos").then(resp => {
+        get("/api/todos").then(resp => {
             let todos = resp.data.todos;
             todos.sort((todo1, todo2) => { return todo1.expires - todo2.expires; })
             this.setState({ todos: resp.data.todos })
@@ -79,7 +79,7 @@ class TodoRow extends Component {
     }
 
     deleteTodo(event) {
-        post("/delete-todo", { id: this.state.id })
+        post("/api/delete-todo", { id: this.state.id })
             .then(resp => {
                 console.log(resp);
                 window.location.reload();
@@ -113,7 +113,7 @@ class PostForm extends Component {
             return;
         }
         post(
-            "/new-todo", {
+            "/api/new-todo", {
                 desc: this.state.desc,
                 expires: new Date(this.state.date).getTime(),
                 done: false
-- 
cgit v1.2.1-18-gbd029

