mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-22 15:15:34 +00:00
Use axios because it does the correct PUT format by default
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user