Use axios because it does the correct PUT format by default

This commit is contained in:
Jeffrey Biles
2020-03-29 00:35:22 -07:00
parent 285cc2c4e3
commit 3842b5a7f5
5 changed files with 28 additions and 4 deletions

View File

@@ -8,12 +8,12 @@
import MailScreenArchived from '@/components/MailScreenArchived.vue';
import MailScreenInbox from '@/components/MailScreenInbox.vue';
import { ref } from 'vue';
import axios from 'axios';
export default {
async setup(){
let response = await fetch('http://localhost:3000/emails');
let emails = await response.json();
emails = ref(emails);
let {data} = await axios.get('http://localhost:3000/emails');
let emails = ref(data);
return {emails};
},