Feat: roomlist update
This commit is contained in:
		| @@ -8,16 +8,6 @@ import ( | ||||
| 	"net/http" | ||||
| ) | ||||
|  | ||||
| // func HandleRoomList(w http.ResponseWriter, r *http.Request) { | ||||
| // 	pubRooms := listPublicRooms() | ||||
| // 	tmpl, err := template.ParseGlob("components/*.html") | ||||
| // 	if err != nil { | ||||
| // 		abortWithError(w, err.Error()) | ||||
| // 		return | ||||
| // 	} | ||||
| // 	tmpl.ExecuteTemplate(w, "base", pubRooms) | ||||
| // } | ||||
|  | ||||
| func HandleCreateRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 	// parse payload | ||||
| 	payload := &models.RoomReq{ | ||||
| @@ -49,6 +39,7 @@ func HandleCreateRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 		abortWithError(w, msg) | ||||
| 		return | ||||
| 	} | ||||
| 	notify(models.NotifyRoomListUpdate, "") | ||||
| 	// send msg of created room | ||||
| 	// h.Broker.Notifier <- broker.NotificationEvent{ | ||||
| 	// 	EventName: models.MsgRoomListUpdate, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder