Opt: create and login resp add roomId

pull/21/head
zijiren233 2 years ago
parent a026f82300
commit 0265f872d8

@ -55,7 +55,8 @@ func CreateRoom(ctx *gin.Context) {
} }
ctx.JSON(http.StatusCreated, model.NewApiDataResp(gin.H{ ctx.JSON(http.StatusCreated, model.NewApiDataResp(gin.H{
"token": token, "roomId": room.ID,
"token": token,
})) }))
} }
@ -178,7 +179,8 @@ func LoginRoom(ctx *gin.Context) {
} }
ctx.JSON(http.StatusOK, model.NewApiDataResp(gin.H{ ctx.JSON(http.StatusOK, model.NewApiDataResp(gin.H{
"token": token, "roomId": room.ID,
"token": token,
})) }))
} }
@ -222,7 +224,8 @@ func SetRoomPassword(ctx *gin.Context) {
} }
ctx.JSON(http.StatusOK, model.NewApiDataResp(gin.H{ ctx.JSON(http.StatusOK, model.NewApiDataResp(gin.H{
"token": token, "roomId": room.ID,
"token": token,
})) }))
} }

Loading…
Cancel
Save