submit session data works

mic_level
Matthew Huntington 3 years ago
parent ade7fa9612
commit 7424650ab6

@ -18,10 +18,20 @@
methods: { methods: {
submit(event){ submit(event){
event.preventDefault(); event.preventDefault();
console.log(this.description); const reqBody = {
console.log(this.seconds); description:this.description,
console.log(this.comments); seconds: this.totalSeconds,
console.log(this.practice_category_id); 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){ start(event){
this.startTime = Date.now(); this.startTime = Date.now();

Loading…
Cancel
Save