mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
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:
committed by
Travis Reeder
parent
85f7a53cc0
commit
53cbe2d5a4
@@ -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 == "" {
|
||||
|
||||
Reference in New Issue
Block a user