From 84f2dee985c17142f9863b4d29cf2fa01e05b830 Mon Sep 17 00:00:00 2001 From: Brett Bender Date: Mon, 12 Feb 2024 18:57:56 -0600 Subject: [PATCH] fix: type mismatch --- internal/api/shelves.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/shelves.go b/internal/api/shelves.go index 134c408..26d3fc2 100644 --- a/internal/api/shelves.go +++ b/internal/api/shelves.go @@ -107,7 +107,7 @@ func (s *APIServer) createShelf(w http.ResponseWriter, r *http.Request) error { Name: data.Name, RoomNumber: data.RoomNumber, Description: data.Description, - BuildingID: data.BuildingID, + BuildingID: *data.BuildingID, } err := s.db.CreateShelfLocation(shelf) @@ -158,7 +158,7 @@ func (s *APIServer) updateShelf(w http.ResponseWriter, r *http.Request) error { shelf := &types.ShelfLocation{ ID: eShelf.ID, Name: data.Name, - BuildingID: data.BuildingID, + BuildingID: *data.BuildingID, RoomNumber: data.RoomNumber, }