submit session data works

mic_level
Matthew Huntington 3 years ago
parent ade7fa9612
commit 7424650ab6

@ -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();

Loading…
Cancel
Save