Skip to content

Commit

Permalink
add waiting_room enabled_origin_commands support
Browse files Browse the repository at this point in the history
  • Loading branch information
broswen committed Aug 21, 2024
1 parent dcccf42 commit 0a28900
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/todo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
waiting_room: add support for `enabled_origin_commands`
```
1 change: 1 addition & 0 deletions waiting_room.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type WaitingRoom struct {
CookieSuffix string `json:"cookie_suffix"`
AdditionalRoutes []*WaitingRoomRoute `json:"additional_routes,omitempty"`
QueueingStatusCode int `json:"queueing_status_code"`
EnabledOriginCommands []string `json:"enabled_origin_commands"`
}

// WaitingRoomStatus describes the status of a waiting room.
Expand Down
8 changes: 5 additions & 3 deletions waiting_room_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ var waitingRoomJSON = fmt.Sprintf(`
"default_template_language": "en-US",
"next_event_prequeue_start_time": null,
"next_event_start_time": "%s",
"cookie_suffix": "example_shop",
"additional_routes": [{"host": "shop2.example.com", "path": "/shop/checkout"}],
"queueing_status_code": 200
"cookie_suffix": "example_shop",
"additional_routes": [{"host": "shop2.example.com", "path": "/shop/checkout"}],
"queueing_status_code": 200,
"enabled_origin_commands": ["revoke"]
}
`, waitingRoomID, testTimestampWaitingRoom.Format(time.RFC3339Nano), testTimestampWaitingRoom.Format(time.RFC3339Nano),
testTimestampWaitingRoomEventStart.Format(time.RFC3339Nano))
Expand Down Expand Up @@ -129,6 +130,7 @@ var waitingRoom = WaitingRoom{
CookieSuffix: "example_shop",
AdditionalRoutes: []*WaitingRoomRoute{{Host: "shop2.example.com", Path: "/shop/checkout"}},
QueueingStatusCode: 200,
EnabledOriginCommands: []string{"revoke"},
}

var waitingRoomEvent = WaitingRoomEvent{
Expand Down

0 comments on commit 0a28900

Please sign in to comment.