Skip to content

Commit

Permalink
Merge pull request #202 from yuminn-k/fix/screen-share-routing
Browse files Browse the repository at this point in the history
画面共有機能のルーティングエラー修正
  • Loading branch information
yuminn-k authored Apr 21, 2024
2 parents 8fb89da + 7a9f01f commit f139c17
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion controllers/live_class_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *LiveClassController) CreateRoomHandler() gin.HandlerFunc {
// @Param userID path string true "ユーザーID"
// @Success 200 {object} ScreenShareResponse
// @Failure 400 {object} ErrorResponse
// @Router /live/start-screen-share/{roomID} [get]
// @Router /live/start-screen-share/{roomID}/{userID} [get]
func (c *LiveClassController) StartScreenShareHandler() gin.HandlerFunc {
return func(ctx *gin.Context) {
authHeader := ctx.GetHeader("Authorization")
Expand Down
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2295,7 +2295,7 @@ const docTemplate = `{
}
}
},
"/live/start-screen-share/{roomID}": {
"/live/start-screen-share/{roomID}/{userID}": {
"get": {
"description": "画面共有を開始します。",
"produces": [
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2284,7 +2284,7 @@
}
}
},
"/live/start-screen-share/{roomID}": {
"/live/start-screen-share/{roomID}/{userID}": {
"get": {
"description": "画面共有を開始します。",
"produces": [
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,7 @@ paths:
summary: ルームを生成します。
tags:
- Live Class
/live/start-screen-share/{roomID}:
/live/start-screen-share/{roomID}/{userID}:
get:
description: 画面共有を開始します。
parameters:
Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ func setupChatRoutes(router *gin.Engine, chatController *controllers.ChatControl
chat.DELETE("room/:scheduleId", chatController.DeleteChatRoom)
chat.GET("stream/:scheduleId", chatController.StreamChat)
chat.GET("messages/:roomid", chatController.GetChatMessages)
chat.POST("dm/{senderId}/{receiverId}", chatController.SendDirectMessage)
chat.GET("dm/{userId1}/{userId2}", chatController.GetDirectMessages)
chat.POST("dm/:senderId/:receiverId", chatController.SendDirectMessage)
chat.GET("dm/:userId1/:userId2", chatController.GetDirectMessages)
}
}

Expand Down Expand Up @@ -424,9 +424,9 @@ func manageChatRooms(db *gorm.DB, chatManager *services.Manager) {
func setupLiveClassRoutes(router *gin.Engine, liveClassController *controllers.LiveClassController) {
live := router.Group("/api/gin/live")
{
live.POST("/create-room", liveClassController.CreateRoomHandler())
live.GET("/start-screen-share/{roomID}/{userID}", liveClassController.StartScreenShareHandler())
live.GET("/stop-screen-share/{roomID}/{userID}", liveClassController.StopScreenShareHandler())
live.GET("/view-screen-share/{roomID}", liveClassController.ViewScreenShareHandler())
live.POST("create-room", liveClassController.CreateRoomHandler())
live.GET("start-screen-share/:roomID/:userID", liveClassController.StartScreenShareHandler())
live.GET("stop-screen-share/:roomID/:userID", liveClassController.StopScreenShareHandler())
live.GET("view-screen-share/:roomID", liveClassController.ViewScreenShareHandler())
}
}

0 comments on commit f139c17

Please sign in to comment.