 				}
 			}
 			
+			//TODO: Add close reason?
 			//Connection closed
 			webSocket.onClose = { ws in
 				guard let u = user else {

			user.sendJSON(json: json)
		}
		
		//User requests
		func handleTilePlace(json: JSON) throws {
			//Make sure userID is valid
			//Make sure color is valid
			
			//First get params
			guard let userID = json.object?["userID"]?.string,
				let Xcoord = json.object?["X"]?.int, Xcoord <= canvas.width,
				let Ycoord = json.object?["Y"]?.int, Ycoord <= canvas.height,
				let colorID = json.object?["colorID"]?.int else {
					//Reply with some error message
					return
			}
			
			//Verifications here (uuid valid? tiles available? etc)
			//TODO
			//Then store this action to DB
			
			//Then update canvas

						case "getColors":
							try sendColors(json: json, user: user!)
						case "getTileData": break
						case "getStats": break //Connected users
						default:
							throw BackendError.invalidRequestType
						}
