|
|
@ -1,5 +1,5 @@
|
|
|
|
'use strict'
|
|
|
|
'use strict'
|
|
|
|
|
|
|
|
import Vue from 'vue'
|
|
|
|
import _ from 'lodash'
|
|
|
|
import _ from 'lodash'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
RequestState
|
|
|
|
RequestState
|
|
|
@ -389,7 +389,7 @@ export default {
|
|
|
|
async loadSubscriberRegistrations ({ commit, dispatch, state, rootGetters }, options) {
|
|
|
|
async loadSubscriberRegistrations ({ commit, dispatch, state, rootGetters }, options) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const list = await getSubscriberRegistrations({
|
|
|
|
const list = await getSubscriberRegistrations({
|
|
|
|
...options
|
|
|
|
...options, ...{ expand: 'subscriber_id' }
|
|
|
|
})
|
|
|
|
})
|
|
|
|
commit('setSubscriberRegistrations', list.items)
|
|
|
|
commit('setSubscriberRegistrations', list.items)
|
|
|
|
return list.totalCount
|
|
|
|
return list.totalCount
|
|
|
@ -398,6 +398,9 @@ export default {
|
|
|
|
throw err
|
|
|
|
throw err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
async removeSubscriberRegistration (context, row) {
|
|
|
|
|
|
|
|
await Vue.http.delete('api/subscriberregistrations/' + row.id)
|
|
|
|
|
|
|
|
},
|
|
|
|
async fetchAuthToken ({ commit, state, getters }, expiringTime = 300) {
|
|
|
|
async fetchAuthToken ({ commit, state, getters }, expiringTime = 300) {
|
|
|
|
const subscriber = state.subscriber
|
|
|
|
const subscriber = state.subscriber
|
|
|
|
const expireDate = date.addToDate(new Date(), { seconds: expiringTime })
|
|
|
|
const expireDate = date.addToDate(new Date(), { seconds: expiringTime })
|
|
|
|