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

@@ -31,6 +31,7 @@
import MailView from '@/components/MailView.vue';
import ModalView from '@/components/ModalView.vue';
import { ref } from 'vue';
import axios from 'axios';
export default {
setup({emails}){
@@ -42,6 +43,7 @@
if(email) {
openedEmail.value.read = true;
axios.put(`http://localhost:3000/emails/${openedEmail.value.id}`, openedEmail.value)
}
}