stop riding the short bus, no clue why this stuff is here. only adds confusion, removing (#1)

server exposes Router field
This commit is contained in:
Reed Allman
2017-07-30 16:31:31 -07:00
committed by Travis Reeder
parent 85f7a53cc0
commit 53cbe2d5a4
5 changed files with 5 additions and 120 deletions

View File

@@ -28,31 +28,6 @@ type runnerResponse struct {
Error *models.ErrorBody `json:"error,omitempty"`
}
func (s *Server) handleSpecial(c *gin.Context) {
ctx := c.Request.Context()
ctx = context.WithValue(ctx, api.AppName, "")
c.Set(api.AppName, "")
ctx = context.WithValue(ctx, api.Path, c.Request.URL.Path)
c.Set(api.Path, c.Request.URL.Path)
r, err := s.UseSpecialHandlers(c.Writer, c.Request)
if err != nil {
handleErrorResponse(c, err)
return
}
c.Request = r
c.Set(api.AppName, r.Context().Value(api.AppName).(string))
if c.MustGet(api.AppName).(string) == "" {
handleErrorResponse(c, models.ErrRoutesNotFound)
return
}
// now call the normal runner call
s.handleRequest(c, nil)
}
func toEnvName(envtype, name string) string {
name = strings.ToUpper(strings.Replace(name, "-", "_", -1))
if envtype == "" {