This commit is contained in:
Alex
2025-04-10 15:40:22 +02:00
parent 87f08dd3be
commit 18f5dadb06
48 changed files with 1650 additions and 981 deletions

View File

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