Feat: roomlist & join room
This commit is contained in:
		| @@ -1,6 +1,7 @@ | ||||
| package handlers | ||||
|  | ||||
| import ( | ||||
| 	"errors" | ||||
| 	"golias/models" | ||||
| 	"html/template" | ||||
| 	"net/http" | ||||
| @@ -45,6 +46,12 @@ func HandleShowColor(w http.ResponseWriter, r *http.Request) { | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	// TODO: whos move it is? | ||||
| 	if state.Role != "guesser" { | ||||
| 		err = errors.New("need to guesser to open the card") | ||||
| 		abortWithError(w, err.Error()) | ||||
| 		return | ||||
| 	} | ||||
| 	log.Debug("got state", "state", state) | ||||
| 	// TODO: update room score | ||||
| 	color, exists := roundWords[word] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder