Feat: game setting fields
This commit is contained in:
		| @@ -12,10 +12,16 @@ import ( | ||||
| ) | ||||
|  | ||||
| func HandleCreateRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 	turnTimeStr := r.PostFormValue("game_time") | ||||
| 	ttU64, err := strconv.ParseUint(turnTimeStr, 10, 64) | ||||
| 	if err != nil { | ||||
| 		log.Warn("failed to parse turn time", "game_time", turnTimeStr) | ||||
| 	} | ||||
| 	// parse payload | ||||
| 	payload := &models.RoomReq{ | ||||
| 		RoomPass: r.PostFormValue("room_pass"), | ||||
| 		RoomName: r.PostFormValue("room_name"), | ||||
| 		RoomPass:  r.PostFormValue("room_pass"), | ||||
| 		Language:  r.PostFormValue("language"), | ||||
| 		RoundTime: uint32(ttU64), | ||||
| 	} | ||||
| 	// create a room | ||||
| 	room, err := createRoom(r.Context(), payload) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder