finish file request

This commit is contained in:
Čarodej
2022-02-22 09:35:06 +01:00
parent 171ee5fa04
commit c3398f0da4
9 changed files with 185 additions and 113 deletions

View File

@@ -9,8 +9,7 @@ const defaultState = {
}
const actions = {
getUploadRequestDetail: ({ commit, getters }) => {
getUploadRequestDetail: ({ commit }) => {
axios.get(`/api/upload-request/${router.currentRoute.params.token}`)
.then((response) => {
@@ -24,6 +23,15 @@ const actions = {
}
})
},
closeUploadRequest: ({ commit }) => {
axios
.delete(`/api/upload-request/${router.currentRoute.params.token}`)
.then((response) => {
commit('LOADING_STATE', { loading: false, data: [] })
commit('SET_UPLOAD_REQUEST', response.data)
})
.catch(() => this.$isSomethingWrong())
},
}
const mutations = {