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
|
@ -339,7 +339,7 @@ const store = createStore({
|
|||
commit('replaceEvents', [...state.events.filter(e => e.id !== event_id)])
|
||||
}
|
||||
},
|
||||
async updateEvent({commit, dispatch, state}, {id, partial_event}){
|
||||
async updateEvent({commit, dispatch, state}, {id, partial_event}) {
|
||||
const {data, success} = await http.patch(`/2/events/${id}/`, partial_event, state.user.token);
|
||||
if (success) {
|
||||
commit('replaceEvents', [...state.events.filter(e => e.id !== id), data])
|
||||
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue