stash
This commit is contained in:
parent
cc3fec7347
commit
4140214c81
5 changed files with 206 additions and 4 deletions
|
|
@ -250,11 +250,13 @@ export default createStore({
|
|||
state.last_load.files = Date.now()
|
||||
return data
|
||||
},
|
||||
async pushFile({state, dispatch, getters}, {file}) {
|
||||
async pushFile({state, dispatch, getters}, {item_id, file}) {
|
||||
const servers = await dispatch('getHomeServers')
|
||||
const data = await servers.post(getters.signAuth, '/api/files/', file)
|
||||
state.files.push(data)
|
||||
return data
|
||||
const data = await servers.post(getters.signAuth, '/api/item_files/'+item_id+'/', file)
|
||||
if (data.mime_type) {
|
||||
state.files.push(data)
|
||||
return data
|
||||
}
|
||||
},
|
||||
async fetchTags({state, commit, dispatch, getters}) {
|
||||
if (state.last_load.tags > Date.now() - 1000 * 60 * 60 * 24) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue