Added redirect on create
This commit is contained in:
		
							parent
							
								
									c0c7397a82
								
							
						
					
					
						commit
						8527560333
					
				| @ -60,9 +60,12 @@ function submitTournament(event) { | ||||
|   }) | ||||
|     .then(response => response.json()) | ||||
|     .then(data => { | ||||
|       if (data.status == "OK") { | ||||
|       if (data.status === "OK") { | ||||
|         alert("Tournament created successfully"); | ||||
|         window.location.href = "/"; | ||||
|         let tournamentId = data.data.tournamentId; | ||||
|         if (tournamentId) { | ||||
|           window.location.href = "/tournament/" + tournamentId; | ||||
|         } | ||||
|       } else { | ||||
|         showError(data.data) | ||||
|       } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user