bugfix: use correct url in manual ticket creation
This commit is contained in:
parent
b393767871
commit
f266133d14
1 changed files with 7 additions and 3 deletions
|
@ -443,7 +443,8 @@ const store = createStore({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async postManualTicket({commit, dispatch, state, getters}, {sender, message, title,}) {
|
async postManualTicket({commit, dispatch, state, getters}, {sender, message, title,}) {
|
||||||
const {data, success} = await getters.session.post(`/2/tickets/manual/`, {
|
const slug = getters.getEventSlug;
|
||||||
|
const {data, success} = await getters.session.post(`/2/${slug !== 'all' ? slug : 'none'}/tickets/manual/`, {
|
||||||
name: title, sender, body: message, recipient: 'mail@c3lf.de'
|
name: title, sender, body: message, recipient: 'mail@c3lf.de'
|
||||||
});
|
});
|
||||||
await dispatch('loadTickets');
|
await dispatch('loadTickets');
|
||||||
|
@ -456,7 +457,10 @@ const store = createStore({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async postItemComment({commit, dispatch, state, getters}, {id, message}) {
|
async postItemComment({commit, dispatch, state, getters}, {id, message}) {
|
||||||
const {data, success} = await getters.session.post(`/2/${getters.getEventSlug}/item/${id}/comment/`, {comment: message});
|
const {
|
||||||
|
data,
|
||||||
|
success
|
||||||
|
} = await getters.session.post(`/2/${getters.getEventSlug}/item/${id}/comment/`, {comment: message});
|
||||||
if (data && success) {
|
if (data && success) {
|
||||||
state.fetchedData.items = 0;
|
state.fetchedData.items = 0;
|
||||||
await dispatch('loadEventItems');
|
await dispatch('loadEventItems');
|
||||||
|
|
Loading…
Add table
Reference in a new issue