diff --git a/server/handlers/init.go b/server/handlers/init.go index 18c89ab9..d6c792f3 100644 --- a/server/handlers/init.go +++ b/server/handlers/init.go @@ -173,6 +173,8 @@ func initRoom(room *gin.RouterGroup, needAuthUser *gin.RouterGroup, needAuthRoom needAuthRoom.GET("/me", RoomMe) + needAuthRoom.GET("/settings", RoomPiblicSettings) + needAuthRoom.GET("/members", RoomMembers) { diff --git a/server/handlers/room.go b/server/handlers/room.go index 67d7efd4..54e4e714 100644 --- a/server/handlers/room.go +++ b/server/handlers/room.go @@ -51,6 +51,11 @@ func RoomMe(ctx *gin.Context) { })) } +func RoomPiblicSettings(ctx *gin.Context) { + room := ctx.MustGet("room").(*op.RoomEntry).Value() + ctx.JSON(http.StatusOK, model.NewApiDataResp(room.Settings)) +} + func CreateRoom(ctx *gin.Context) { user := ctx.MustGet("user").(*op.UserEntry).Value() log := ctx.MustGet("log").(*logrus.Entry)