Adds before/after app get/list. And some bug fixes/cleanup. (#610)

* Adds before/after app get/list. And some bug fixes/cleanup.

* Fix test
This commit is contained in:
Travis Reeder
2017-12-21 09:32:03 -08:00
committed by GitHub
parent 0a1b180158
commit fdb4188146
26 changed files with 212 additions and 65 deletions

View File

@@ -14,12 +14,12 @@ func (s *Server) handleRouteDelete(c *gin.Context) {
appName := c.MustGet(api.AppName).(string)
routePath := path.Clean(c.MustGet(api.Path).(string))
if _, err := s.Datastore.GetRoute(ctx, appName, routePath); err != nil {
if _, err := s.Datastore().GetRoute(ctx, appName, routePath); err != nil {
handleErrorResponse(c, err)
return
}
if err := s.Datastore.RemoveRoute(ctx, appName, routePath); err != nil {
if err := s.Datastore().RemoveRoute(ctx, appName, routePath); err != nil {
handleErrorResponse(c, err)
return
}