mirror of
https://github.com/tobiasehlert/teslamateapi.git
synced 2026-02-27 09:54:18 +08:00
adding root endpoint telling API is running
This commit is contained in:
@@ -27,6 +27,13 @@ func main() {
|
||||
// kicking off Gin in value r
|
||||
r := gin.Default()
|
||||
|
||||
// root endpoint telling API is running
|
||||
r.GET("/", func(c *gin.Context) {
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "API runnnig..",
|
||||
})
|
||||
})
|
||||
|
||||
// /cars endpoint
|
||||
r.GET("/cars", func(c *gin.Context) {
|
||||
// TeslaMateAPICars to get cars
|
||||
|
||||
Reference in New Issue
Block a user