VILLASweb-backend-go/routes/simulationmodel/simulationmodelQueries.go
Sonja Happ 2e7475a26b - add first draft of code for other routes (not complete!)
- some new endpoints
- some new DB queries
- some new serializers
2019-05-09 17:02:24 +02:00

12 lines
342 B
Go

package simulationmodel
import (
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/common"
)
func FindAllSimulationModels() ([]common.SimulationModel, int, error) {
db := common.GetDB()
var simulationmodels []common.SimulationModel
err := db.Find(&simulationmodels).Error
return simulationmodels, len(simulationmodels), err
}