diff --git a/src/components/timer.vue b/src/components/timer.vue index e8c2be2..8282185 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -18,10 +18,20 @@ methods: { submit(event){ event.preventDefault(); - console.log(this.description); - console.log(this.seconds); - console.log(this.comments); - console.log(this.practice_category_id); + const reqBody = { + description:this.description, + seconds: this.totalSeconds, + practice_category_id: this.practice_category_id + } + + if(this.comments){ + reqBody.comments = this.comments + } + + axios.post( + import.meta.env.VITE_PRACTICE_TRACKER_API_URL+'sessions', + reqBody + ); }, start(event){ this.startTime = Date.now();