fix: type mismatch
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user