forked from AkkomaGang/admin-fe
Fetch banned objects after banning an url
This commit is contained in:
parent
cd689ac75c
commit
0b36c5bbb0
2 changed files with 5 additions and 1 deletions
|
@ -32,13 +32,16 @@ const mediaProxyCache = {
|
|||
commit('SET_PAGE', page)
|
||||
commit('SET_LOADING', false)
|
||||
},
|
||||
async PurgeUrls({ commit, getters }, { urls, ban }) {
|
||||
async PurgeUrls({ dispatch, getters, state }, { urls, ban }) {
|
||||
await purgeUrls(urls, ban, getters.authHost, getters.token)
|
||||
Message({
|
||||
message: i18n.t('mediaProxyCache.evictedMessage'),
|
||||
type: 'success',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
if (ban) {
|
||||
dispatch('ListBannedUrls', state.currentPage)
|
||||
}
|
||||
},
|
||||
async RemoveBannedUrls({ commit, getters }, urls) {
|
||||
await removeBannedUrls(urls, getters.authHost, getters.token)
|
||||
|
|
|
@ -73,6 +73,7 @@ export default {
|
|||
evictURL() {
|
||||
const urls = typeof this.url === 'string' ? [this.url] : this.url
|
||||
this.$store.dispatch('PurgeUrls', { urls, ban: this.ban })
|
||||
this.url = ''
|
||||
},
|
||||
handleSelectionChange(value) {
|
||||
this.$data.selectedUrls = value
|
||||
|
|
Loading…
Reference in a new issue