wip
This commit is contained in:
@@ -59,8 +59,8 @@ func (s *CarService) FromID(id uint) (*models.Car, error) {
|
||||
|
||||
// GetAll retrieves all cars
|
||||
func (s *CarService) GetAll() (*[]models.Car, error) {
|
||||
var cars []models.Car
|
||||
if err := s.DB.Find(&cars).Error; err != nil {
|
||||
cars, err := models.GetAllCars(s.DB)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &cars, nil
|
||||
|
||||
Reference in New Issue
Block a user