fix event edit not working closes #3

This commit is contained in:
Adrian Zürcher
2025-11-05 11:30:56 +01:00
parent 7b760afeb3
commit 9866cc3ffd
7 changed files with 10 additions and 6 deletions

1
.gitignore vendored
View File

@@ -36,6 +36,7 @@ yarn-error.log*
# local .db files # local .db files
*.db *.db
*.dba
# local .log files # local .log files
*.log *.log

View File

@@ -4,7 +4,7 @@ go 1.24.5
require ( require (
gitea.tecamino.com/paadi/access-handler v1.0.12 gitea.tecamino.com/paadi/access-handler v1.0.12
gitea.tecamino.com/paadi/memberDB v1.0.11 gitea.tecamino.com/paadi/memberDB v1.0.12
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 gitea.tecamino.com/paadi/tecamino-dbm v0.1.1
gitea.tecamino.com/paadi/tecamino-logger v0.2.1 gitea.tecamino.com/paadi/tecamino-logger v0.2.1
github.com/gin-contrib/cors v1.7.6 github.com/gin-contrib/cors v1.7.6

View File

@@ -2,8 +2,8 @@ gitea.tecamino.com/paadi/access-handler v1.0.12 h1:lSmW0YrBJJvCqCg0ukTJHlFUNwd7q
gitea.tecamino.com/paadi/access-handler v1.0.12/go.mod h1:w71lpnuu5MgAWG3oiI9vsY2dWi4njF/iPrM/xV/dbBQ= gitea.tecamino.com/paadi/access-handler v1.0.12/go.mod h1:w71lpnuu5MgAWG3oiI9vsY2dWi4njF/iPrM/xV/dbBQ=
gitea.tecamino.com/paadi/dbHandler v1.0.4 h1:ctnaec0GDdtw3gRQdUISVDYLJ9x+vt50VW41OemfhD4= gitea.tecamino.com/paadi/dbHandler v1.0.4 h1:ctnaec0GDdtw3gRQdUISVDYLJ9x+vt50VW41OemfhD4=
gitea.tecamino.com/paadi/dbHandler v1.0.4/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw= gitea.tecamino.com/paadi/dbHandler v1.0.4/go.mod h1:y/xn/POJg1DO++67uKvnO23lJQgh+XFQq7HZCS9Getw=
gitea.tecamino.com/paadi/memberDB v1.0.11 h1:Mwo86NVe7sLReRf+R4Z6hRxeEIgjjq6EPyiL1L1TlrA= gitea.tecamino.com/paadi/memberDB v1.0.12 h1:chUTNlRpbB0dMcZtXpi114mrWO8G7jrTSkDYIvWzVzQ=
gitea.tecamino.com/paadi/memberDB v1.0.11/go.mod h1:iLm7nunVRzqJK8CV4PJVuWIhgPlQjNIaeOkmtfK5fMg= gitea.tecamino.com/paadi/memberDB v1.0.12/go.mod h1:iLm7nunVRzqJK8CV4PJVuWIhgPlQjNIaeOkmtfK5fMg=
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 h1:vAq7mwUxlxJuLzCQSDMrZCwo8ky5usWi9Qz+UP+WnkI= gitea.tecamino.com/paadi/tecamino-dbm v0.1.1 h1:vAq7mwUxlxJuLzCQSDMrZCwo8ky5usWi9Qz+UP+WnkI=
gitea.tecamino.com/paadi/tecamino-dbm v0.1.1/go.mod h1:+tmf1rjPaKEoNeUcr1vdtoFIFweNG3aUGevDAl3NMBk= gitea.tecamino.com/paadi/tecamino-dbm v0.1.1/go.mod h1:+tmf1rjPaKEoNeUcr1vdtoFIFweNG3aUGevDAl3NMBk=
gitea.tecamino.com/paadi/tecamino-logger v0.2.1 h1:sQTBKYPdzn9mmWX2JXZBtGBvNQH7cuXIwsl4TD0aMgE= gitea.tecamino.com/paadi/tecamino-logger v0.2.1 h1:sQTBKYPdzn9mmWX2JXZBtGBvNQH7cuXIwsl4TD0aMgE=

View File

@@ -133,6 +133,7 @@ func main() {
auth.POST("/members/import/csv", dbHandler.ImportCSV) auth.POST("/members/import/csv", dbHandler.ImportCSV)
auth.POST("/events/add", dbHandler.StartNewEvent) auth.POST("/events/add", dbHandler.StartNewEvent)
auth.POST("/events/edit", dbHandler.UpdateEvent)
auth.POST("/events/add/attendees", dbHandler.AddNewAttendees) auth.POST("/events/add/attendees", dbHandler.AddNewAttendees)
auth.POST("/events/delete/attendees", dbHandler.DeleteAttendee) auth.POST("/events/delete/attendees", dbHandler.DeleteAttendee)
auth.POST("/events/delete", dbHandler.DeleteEvent) auth.POST("/events/delete", dbHandler.DeleteEvent)

Binary file not shown.

View File

@@ -68,13 +68,15 @@ async function save() {
if (!valid) return; if (!valid) return;
let query = 'events/edit?id=' + localEvent.value.id; let query = 'events/edit';
let payload = JSON.stringify([localEvent.value]);
if (newEvent.value) { if (newEvent.value) {
query = 'events/add?name=' + localEvent.value.name; query = 'events/add?name=' + localEvent.value.name;
payload = JSON.stringify(localEvent.value);
} }
appApi appApi
.post(query, JSON.stringify(localEvent.value)) .post(query, payload)
.then(() => { .then(() => {
emit('update'); emit('update');
dialog.value.close(); dialog.value.close();

View File

@@ -125,7 +125,7 @@
</div> </div>
<EditOneDialog <EditOneDialog
ref="editOneDialog" ref="editOneDialog"
endpoint="Events/edit" endpoint="events/edit"
query-id query-id
v-on:update="updateEvents" v-on:update="updateEvents"
></EditOneDialog> ></EditOneDialog>