diff --git a/src/components/MCQQuestion.vue b/src/components/MCQQuestion.vue
index 0745330..035ae57 100644
--- a/src/components/MCQQuestion.vue
+++ b/src/components/MCQQuestion.vue
@@ -40,6 +40,10 @@
+
+
Now you can submit your answer
+
+
No Data Found
@@ -94,6 +98,25 @@ export default {
this.getNextQs();
}
},
+ submitAnswer(){
+ fetch(`https://api8.siliconpin.com/items/users_answers`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type' : 'application/json',
+ },
+ body: JSON.stringify({ answers: this.totalAnswer })
+ })
+ .then(response => {
+ if(response.ok){
+ console.log('Data Saved Succesfully')
+ } else{
+ console.log('Something Wrong')
+ }
+ })
+ .catch(error => {
+ console.error('an error occoured', error)
+ })
+ },
getNextQs() {
this.qPoint++;
this.qsActive=this.qsData[this.qPoint];