bugfix: use correct url in manual ticket creation
All checks were successful
/ test (pull_request) Successful in 4m9s
/ deploy (push) Successful in 5m17s
/ test (push) Successful in 2m45s

This commit is contained in:
j3d1 2024-12-23 17:12:03 +01:00
parent b393767871
commit f266133d14

View file

@ -443,7 +443,8 @@ const store = createStore({
}
},
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'
});
await dispatch('loadTickets');
@ -456,7 +457,10 @@ const store = createStore({
}
},
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) {
state.fetchedData.items = 0;
await dispatch('loadEventItems');