mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
adding wrapper on apps and routes create response
This commit is contained in:
@@ -59,12 +59,12 @@ func handleRouteCreate(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
route, err := Api.Datastore.StoreRoute(wroute.Route)
|
||||
_, err = Api.Datastore.StoreRoute(wroute.Route)
|
||||
if err != nil {
|
||||
log.WithError(err).Error(models.ErrRoutesCreate)
|
||||
c.JSON(http.StatusInternalServerError, simpleError(models.ErrRoutesCreate))
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, route)
|
||||
c.JSON(http.StatusCreated, routeResponse{"Route successfully created", wroute})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user