This commit is contained in:
j3d1 2024-06-28 00:49:09 +02:00
parent d6823a147b
commit fc3484fe22
3 changed files with 32 additions and 23 deletions

View file

@ -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