first commit
This commit is contained in:
27
src/api/event.js
Normal file
27
src/api/event.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
async function save(formData) {
|
||||
return Vue.axios.post('/event', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function modify(formData) {
|
||||
return Vue.axios.put('/event', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteEvent(id) {
|
||||
return Vue.axios.delete("/event/" + id)
|
||||
}
|
||||
|
||||
async function getEvents() {
|
||||
return Vue.axios.get("/event")
|
||||
}
|
||||
|
||||
export {save, modify, deleteEvent, getEvents}
|
Reference in New Issue
Block a user