revert
This commit is contained in:
parent
0b38bcaa21
commit
298f4dcd61
1 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ type RequestContext struct {
|
||||||
Response http.ResponseWriter
|
Response http.ResponseWriter
|
||||||
locator *service.Locator
|
locator *service.Locator
|
||||||
isBoosted bool
|
isBoosted bool
|
||||||
CurrentBrowserUrl string
|
currentBrowserUrl string
|
||||||
hxPromptResponse string
|
hxPromptResponse string
|
||||||
isHxRequest bool
|
isHxRequest bool
|
||||||
hxTargetId string
|
hxTargetId string
|
||||||
|
|
@ -74,7 +74,7 @@ func (c *RequestContext) HxTriggerId() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *RequestContext) HxCurrentBrowserUrl() string {
|
func (c *RequestContext) HxCurrentBrowserUrl() string {
|
||||||
return c.CurrentBrowserUrl
|
return c.currentBrowserUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *RequestContext) Set(key string, value interface{}) {
|
func (c *RequestContext) Set(key string, value interface{}) {
|
||||||
|
|
@ -119,7 +119,7 @@ const RequestContextKey = "htmgo.request.context"
|
||||||
|
|
||||||
func populateHxFields(cc *RequestContext) {
|
func populateHxFields(cc *RequestContext) {
|
||||||
cc.isBoosted = cc.Request.Header.Get(hx.BoostedHeader) == "true"
|
cc.isBoosted = cc.Request.Header.Get(hx.BoostedHeader) == "true"
|
||||||
cc.CurrentBrowserUrl = cc.Request.Header.Get(hx.CurrentUrlHeader)
|
cc.currentBrowserUrl = cc.Request.Header.Get(hx.CurrentUrlHeader)
|
||||||
cc.hxPromptResponse = cc.Request.Header.Get(hx.PromptResponseHeader)
|
cc.hxPromptResponse = cc.Request.Header.Get(hx.PromptResponseHeader)
|
||||||
cc.isHxRequest = cc.Request.Header.Get(hx.RequestHeader) == "true"
|
cc.isHxRequest = cc.Request.Header.Get(hx.RequestHeader) == "true"
|
||||||
cc.hxTargetId = cc.Request.Header.Get(hx.TargetIdHeader)
|
cc.hxTargetId = cc.Request.Header.Get(hx.TargetIdHeader)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue