fix: type mismatch

This commit is contained in:
2024-02-12 18:57:56 -06:00
parent 4ec01d2e8e
commit 84f2dee985

View File

@@ -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,
}