fix event edit not working closes #3
This commit is contained in:
@@ -68,13 +68,15 @@ async function save() {
|
||||
|
||||
if (!valid) return;
|
||||
|
||||
let query = 'events/edit?id=' + localEvent.value.id;
|
||||
let query = 'events/edit';
|
||||
let payload = JSON.stringify([localEvent.value]);
|
||||
if (newEvent.value) {
|
||||
query = 'events/add?name=' + localEvent.value.name;
|
||||
payload = JSON.stringify(localEvent.value);
|
||||
}
|
||||
|
||||
appApi
|
||||
.post(query, JSON.stringify(localEvent.value))
|
||||
.post(query, payload)
|
||||
.then(() => {
|
||||
emit('update');
|
||||
dialog.value.close();
|
||||
|
||||
Reference in New Issue
Block a user