added ctx to datastore and improve mock (#329)

Added ctx to datastore and improved mock
This commit is contained in:
Pedro Nasser
2016-11-22 03:33:44 -02:00
committed by GitHub
parent 5e61d2b055
commit c14bc323f9
23 changed files with 292 additions and 229 deletions

View File

@@ -28,7 +28,8 @@ func handleAppUpdate(c *gin.Context) {
return
}
app, err := Api.Datastore.UpdateApp(wapp.App)
wapp.App.Name = c.Param("app")
app, err := Api.Datastore.UpdateApp(ctx, wapp.App)
if err != nil {
log.WithError(err).Debug(models.ErrAppsUpdate)
c.JSON(http.StatusInternalServerError, simpleError(models.ErrAppsUpdate))