Feat: nullable roomid
This commit is contained in:
		| @@ -38,7 +38,7 @@ func HandleCreateRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 		abortWithError(w, msg) | ||||
| 		return | ||||
| 	} | ||||
| 	fi.State.RoomID = room.ID | ||||
| 	fi.State.RoomID = &room.ID | ||||
| 	fi.Room = room | ||||
| 	if err := repo.RoomCreate(r.Context(), room); err != nil { | ||||
| 		log.Error("failed to create a room", "error", err) | ||||
| @@ -223,7 +223,7 @@ func HandleJoinRoom(w http.ResponseWriter, r *http.Request) { | ||||
| 		return | ||||
| 	} | ||||
| 	// room.PlayerList = append(room.PlayerList, fi.State.Username) | ||||
| 	fi.State.RoomID = room.ID | ||||
| 	fi.State.RoomID = &room.ID | ||||
| 	fi.Room = room | ||||
| 	fi.List = nil | ||||
| 	if err := saveFullInfo(r.Context(), fi); err != nil { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder