이벤트 배너 API - Admin API URL로 변경
This commit is contained in:
parent
6edd6c1558
commit
c2a4a64417
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
async function save(formData) {
|
||||
return Vue.axios.post('/event', formData, {
|
||||
return Vue.axios.post('/admin/event/banner', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -9,7 +9,7 @@ async function save(formData) {
|
|||
}
|
||||
|
||||
async function modify(formData) {
|
||||
return Vue.axios.put('/event', formData, {
|
||||
return Vue.axios.put('/admin/event/banner', formData, {
|
||||
headers: {
|
||||
"Content-Type": "multipart/form-data",
|
||||
},
|
||||
|
@ -17,11 +17,11 @@ async function modify(formData) {
|
|||
}
|
||||
|
||||
async function deleteEvent(id) {
|
||||
return Vue.axios.delete("/event/" + id)
|
||||
return Vue.axios.delete("/admin/event/banner/" + id)
|
||||
}
|
||||
|
||||
async function getEvents() {
|
||||
return Vue.axios.get("/event")
|
||||
return Vue.axios.get("/admin/event/banner")
|
||||
}
|
||||
|
||||
export {save, modify, deleteEvent, getEvents}
|
||||
|
|
|
@ -343,7 +343,7 @@ export default {
|
|||
try {
|
||||
const res = await api.getEvents(this.page)
|
||||
if (res.status === 200 && res.data.success === true) {
|
||||
this.events = res.data.data.eventList
|
||||
this.events = res.data.data
|
||||
} else {
|
||||
this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue