func ChatroomCreateController(w http.ResponseWriter, r *http.Request) {
	chatroomManager := models.ChatroomManager{}

	// 1 hour
	endDatetime := time.Now().Add(time.Duration(1) * time.Hour)

	chatroom := models.Chatroom{Code: utils.GetGUID(), MaxMembers: 5, EndDatetime: &endDatetime}
	chatroomManager.Create(&chatroom)

	utils.WriteJson(w, &chatroom)
}
func ChatroomListController(w http.ResponseWriter, r *http.Request) {
	page := utils.GetParamInt(r, "page", 1)

	chatroomManager := models.ChatroomManager{}
	pagination := models.NewPagination(page, models.PAGINATION_DEFAULT_LENGTH, chatroomManager.Count())
	chatrooms := chatroomManager.Find(pagination)

	bytes := utils.ToJsonBytes(&chatrooms)

	utils.WriteJsonBytes(w, bytes)
}