adding wrapper on apps and routes create response

This commit is contained in:
Pedro Nasser
2016-08-15 23:22:35 -03:00
parent 43ab8da867
commit b57e6656d2
4 changed files with 28 additions and 8 deletions

View File

@@ -38,12 +38,12 @@ func handleRouteUpdate(c *gin.Context) {
return
}
route, err := Api.Datastore.StoreRoute(wroute.Route)
_, err = Api.Datastore.StoreRoute(wroute.Route)
if err != nil {
log.WithError(err).Debug(models.ErrAppsCreate)
c.JSON(http.StatusInternalServerError, simpleError(models.ErrAppsCreate))
return
}
c.JSON(http.StatusOK, route)
c.JSON(http.StatusOK, routeResponse{"Route successfully updated", wroute})
}