mirror of
https://github.com/LucasVbr/own-workspace.git
synced 2026-05-19 10:53:19 +00:00
✨ - Setup todos tracking with axios and backend
This commit is contained in:
@@ -26,6 +26,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const HEROKU_URL = 'https://workspace-backend.herokuapp.com/';
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
name: "ToDoList",
|
||||
@@ -57,6 +59,9 @@ export default {
|
||||
this.clearItem()
|
||||
this.saveCurrentItems()
|
||||
localStorage.setItem("nbItemsFinished", this.$store.getters.itemsFinished.length);
|
||||
axios.post(HEROKU_URL + 'todos', {
|
||||
title: item.text,
|
||||
})
|
||||
},
|
||||
clearItem() {
|
||||
this.item = ""
|
||||
|
||||
Reference in New Issue
Block a user