CRUD Events and React interaction

This commit is contained in:
cdricms
2025-01-27 17:58:47 +01:00
parent 9843158803
commit ac7e97527f
17 changed files with 887 additions and 349 deletions

View File

@@ -22,7 +22,7 @@ func HandleUpdateEvent(w http.ResponseWriter, r *http.Request) {
}
event_uuid := r.PathValue("event_uuid")
event.EventID, err = uuid.FromBytes([]byte(event_uuid))
event.EventID, err = uuid.Parse(event_uuid)
if err != nil {
core.JSONError{
Status: core.Error,
@@ -44,7 +44,7 @@ func HandleUpdateEvent(w http.ResponseWriter, r *http.Request) {
// }
_, err = core.DB.NewUpdate().
Model(event).
Model(&event).
OmitZero().
WherePK().
Exec(context.Background())
@@ -62,4 +62,3 @@ func HandleUpdateEvent(w http.ResponseWriter, r *http.Request) {
Data: event,
}.Respond(w, http.StatusOK)
}