Skip to content

Commit 3d9b5f0

Browse files
authored
keep rto (#559)
1 parent 52d90b8 commit 3d9b5f0

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.16.3
1+
v0.16.4

pkg/constants/buz.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ const (
1212
BUZ_VALID_EVENTS string = "buz_valid_events"
1313
BUZ_INVALID_EVENTS string = "buz_invalid_events"
1414
BUZ string = "buz"
15-
BUZ_REDIRECT_PARAM string = "z"
15+
BUZ_REDIRECT_TO_PARAM string = "rto"
1616
)

pkg/protocol/pixel/eventBuilder.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"encoding/json"
1010

1111
"github.com/gin-gonic/gin"
12-
"github.com/silverton-io/buz/pkg/constants"
1312
"github.com/silverton-io/buz/pkg/envelope"
1413
"github.com/silverton-io/buz/pkg/util"
1514
)
@@ -20,7 +19,7 @@ const (
2019
)
2120

2221
func buildEvent(c *gin.Context) (envelope.SelfDescribingPayload, error) {
23-
params := util.MapUrlParams(c, constants.BUZ_REDIRECT_PARAM) // Remove reserved redirect param
22+
params := util.MapUrlParams(c)
2423
schemaName := util.GetSchemaNameFromRequest(c, ARBITRARY_PIXEL_SCHEMA)
2524
base64EncodedPayload := params[B64_ENCODED_PAYLOAD_PARAM]
2625
if base64EncodedPayload != nil {

pkg/protocol/pixel/input.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ func (i *PixelInput) Handler(m manifold.Manifold, conf config.Config, metadata *
4343
c.Header("Retry-After", response.RETRY_AFTER_60)
4444
c.JSON(http.StatusServiceUnavailable, response.ManifoldDistributionError)
4545
} else {
46-
redirectUrl, _ := c.GetQuery(constants.BUZ_REDIRECT_PARAM)
46+
redirectUrl, _ := c.GetQuery(constants.BUZ_REDIRECT_TO_PARAM)
4747
if redirectUrl != "" {
48-
log.Debug().Msg("🟢 redirecting to " + redirectUrl)
48+
log.Debug().Msg("🟡 redirecting to " + redirectUrl)
4949
c.Redirect(http.StatusFound, redirectUrl)
5050
}
5151
b, _ := base64.StdEncoding.DecodeString(PX)

schemas/io.silverton/buz/pixel/linkClick/v1.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
},
1616
"type": "object",
1717
"properties": {
18-
"link": {
18+
"rto": {
1919
"type": "string",
20-
"description": "The link"
20+
"description": "The link that was redirected to"
2121
}
2222
},
2323
"additionalProperties": true,

0 commit comments

Comments
 (0)