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,
|
Name: data.Name,
|
||||||
RoomNumber: data.RoomNumber,
|
RoomNumber: data.RoomNumber,
|
||||||
Description: data.Description,
|
Description: data.Description,
|
||||||
BuildingID: data.BuildingID,
|
BuildingID: *data.BuildingID,
|
||||||
}
|
}
|
||||||
|
|
||||||
err := s.db.CreateShelfLocation(shelf)
|
err := s.db.CreateShelfLocation(shelf)
|
||||||
@@ -158,7 +158,7 @@ func (s *APIServer) updateShelf(w http.ResponseWriter, r *http.Request) error {
|
|||||||
shelf := &types.ShelfLocation{
|
shelf := &types.ShelfLocation{
|
||||||
ID: eShelf.ID,
|
ID: eShelf.ID,
|
||||||
Name: data.Name,
|
Name: data.Name,
|
||||||
BuildingID: data.BuildingID,
|
BuildingID: *data.BuildingID,
|
||||||
RoomNumber: data.RoomNumber,
|
RoomNumber: data.RoomNumber,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user