Skip to content
Snippets Groups Projects
Commit c531f761 authored by Isa H's avatar Isa H
Browse files

before switchin branches

parent 38c8f855
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@
</template>
</v-tab>
<v-tab ripple @click="updatePrettyPrint()">Metadata preview</v-tab>
<v-tab ripple @click="addPost()">Mongo</v-tab>
<!-- <v-tab ripple @click="addPost()">Mongo</v-tab>-->
<!-- <v-tab v-if="templating" ripple @click="loadTemplates()">Templates</v-tab>-->
</v-tabs>
......@@ -244,41 +244,7 @@ export default {
return "unknown";
}
},
submitMongo: async function() {
var self = this;
//var httpFormData = new FormData();
var myjson = {
title: "poupinette",
description: "mon poupie"
};
//httpFormData.append(JSON.stringify(myjson));
//console.log("httpFormData", self.getMetadata());
axios.post(
self.$store.state.settings.instance.mongo + "/posts",
{
title: "NOW",
description: "NOWWWWWWWWWWWWWWWWWWWWWWW"
},
{
headers: {
"Content-Type": "application/json"
}
}
);
// fetch(self.$store.state.settings.instance.mongo, {
// method: "POST",
// headers: {
// "Content-Type": "application/json"
// },
// body: JSON.stringify(myjson)
// })
// .then(response => response.json())
// .then(function(json) {})
// .catch(function(error) {});
},
submit: async function() {
var self = this;
this.loading = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment