stash
This commit is contained in:
parent
d6823a147b
commit
fc3484fe22
3 changed files with 32 additions and 23 deletions
|
@ -22,6 +22,7 @@ const store = createStore({
|
|||
messageTemplates: [],
|
||||
messageTemplateVariables: [],
|
||||
shippingVouchers: [],
|
||||
userNotificationChannels: [],
|
||||
|
||||
lastEvent: '37C3',
|
||||
lastUsed: {},
|
||||
|
@ -506,7 +507,14 @@ const store = createStore({
|
|||
state.fetchedData.tickets = 0;
|
||||
await Promise.all([dispatch('loadTickets'), dispatch('fetchShippingVouchers')]);
|
||||
}
|
||||
}
|
||||
},
|
||||
async fetchUserNotificationChannels({commit, state}) {
|
||||
if (!state.user.token) return;
|
||||
const {data, success} = await http.get('/2/user_notification_channels/', state.user.token);
|
||||
if (data && success) {
|
||||
state.userNotificationChannels = data;
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
persistentStatePlugin({ // TODO change remember to some kind of enable field
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue