VILLASweb-backend-go/endpoints/simulationEndpoints.go
Sonja Happ 44e15773fd Major changes:
- revise data model to new version (without project)
- adapt database test to new data model
- use separate folder for all endpoint defs and functions to avoid circular deps
- add all API endpoints and skeletons for their implementation
2019-05-21 12:49:39 +02:00

40 lines
849 B
Go

package endpoints
import (
"git.rwth-aachen.de/acs/public/villas/villasweb-backend-go/routes/simulation"
"github.com/gin-gonic/gin"
"net/http"
)
func simulationReadAllEp(c *gin.Context) {
allSimulations, _, _ := simulation.FindAllSimulations()
serializer := simulation.SimulationsSerializerNoAssoc{c, allSimulations}
c.JSON(http.StatusOK, gin.H{
"simulations": serializer.Response(),
})
}
func simulationRegistrationEp(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "NOT implemented",
})
}
func simulationUpdateEp(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "NOT implemented",
})
}
func simulationReadEp(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "NOT implemented",
})
}
func simulationDeleteEp(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"message": "NOT implemented",
})
}