Skip to content

Commit af54ea8

Browse files
committed
fix: standardize RoomID and IngressID variable naming in API responses
1 parent 0143b5b commit af54ea8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

router/v3/qall.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (h *Handlers) CreateSoundboardItem(c echo.Context) error {
6262
func (h *Handlers) PlaySoundboardItem(c echo.Context) error {
6363
type playSoundboardItemRequest struct {
6464
SoundID string `json:"soundId"`
65-
RoomID string `json:"roomID"`
65+
RoomID string `json:"roomId"`
6666
}
6767
var req playSoundboardItemRequest
6868
if err := c.Bind(&req); err != nil {
@@ -146,12 +146,12 @@ func (h *Handlers) PlaySoundboardItem(c echo.Context) error {
146146
}
147147

148148
resp := struct {
149-
IngressId string `json:"ingressId"`
150-
Url *string `json:"url"`
149+
IngressID string `json:"ingressId"`
150+
URL *string `json:"url"`
151151
StreamKey *string `json:"streamKey"`
152152
}{
153-
IngressId: info.IngressId,
154-
Url: &info.Url,
153+
IngressID: info.IngressId,
154+
URL: &info.Url,
155155
StreamKey: &info.StreamKey,
156156
}
157157
return c.JSON(http.StatusOK, resp)
@@ -324,7 +324,7 @@ func (h *Handlers) GetLiveKitToken(c echo.Context) error {
324324

325325
roomID, err := uuid.FromString(room)
326326
if err != nil {
327-
return herror.BadRequest("invalid room ID")
327+
return herror.BadRequest("invalid room Id")
328328
}
329329

330330
if !h.ChannelManager.PublicChannelTree().IsChannelPresent(roomID) {

router/v3/router.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ func (h *Handlers) Setup(e *echo.Group) {
398398
apiQall.GET("/rooms", h.GetRoomState, requires(permission.WebRTC))
399399
apiQall.GET("/token", h.GetLiveKitToken, requires(permission.WebRTC))
400400
apiQall.PATCH(("rooms/:roomID/metadata"), h.PatchRoomMetadata, requires(permission.WebRTC))
401-
apiQall.PATCH(("/rooms/:room_id/participants"), h.PatchRoomParticipants, requires(permission.WebRTC))
401+
apiQall.PATCH(("/rooms/:roomID/participants"), h.PatchRoomParticipants, requires(permission.WebRTC))
402402
}
403403

404404
api.GET("/ws", echo.WrapHandler(h.WS), requires(permission.ConnectNotificationStream), blockBot)

0 commit comments

Comments
 (0)