From 663f1b3c4b8e48d41fcd7fed77763e8851a24bcb Mon Sep 17 00:00:00 2001 From: RN Date: Sun, 31 Mar 2024 17:45:53 -0700 Subject: [PATCH] fix: rename model --- apimodels/register.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apimodels/register.go b/apimodels/register.go index 8012f97..307a8c4 100644 --- a/apimodels/register.go +++ b/apimodels/register.go @@ -1,6 +1,6 @@ package apimodels -type RegisterVolunteerModel struct { +type RegisterVolunteer struct { EventID int `json:"eventId"` VolunteerID int `json:"volunteerId"` } diff --git a/main.go b/main.go index 384700d..da7737b 100644 --- a/main.go +++ b/main.go @@ -92,7 +92,7 @@ func bind(e *echo.Echo, eventStore store.EventStore) { }) e.POST("/api/event/register", func(c echo.Context) error { - registerReq := new(apimodels.RegisterVolunteerModel) + registerReq := new(apimodels.RegisterVolunteer) if err := c.Bind(registerReq); err != nil { return c.JSON(http.StatusBadRequest, err) }