diff --git a/js/api.js b/js/api.js
index b440bde..ad1d6df 100644
--- a/js/api.js
+++ b/js/api.js
@@ -184,7 +184,7 @@ const reducerTournamentinfo = (state = defaultStateTournamentinfo, action) => {
case actionTypesTournamentinfo.CREATE_TOURNAMENT:
postRequest(action.state, '/tournaments', action.parameters.tournament).then(resp => {
storeOptionalToken(resp);
- action.parameters.successCallback();
+ action.parameters.successCallback(resp.data);
}).catch(error => {
if (error.response) {
storeOptionalToken(error.response);
diff --git a/pages/create.js b/pages/create.js
index 0883b4a..50b56e8 100644
--- a/pages/create.js
+++ b/pages/create.js
@@ -21,6 +21,7 @@ import {Footer} from '../js/components/Footer';
import EditableStringList from '../js/components/EditableStringList';
import {createTournament} from '../js/api';
import {WarningPopup} from '../js/components/WarningPopup';
+import Router from 'next/router';
import '../static/css/everypage.css';
import RequireLogin from '../js/components/RequireLogin';
@@ -216,8 +217,8 @@ class CreateTournamentForm extends React.Component {
create() {
if (this.valuesAreCredible()) {
- createTournament(this.generateTournamentCreationObject(), () => {
- notify.show('Das Turnier wurde erfolgreich erstellt.', 'success', 5000);
+ createTournament(this.generateTournamentCreationObject(), data => {
+ Router.push('/t/' + data.id);
}, () => {
notify.show('Das Turnier konnte nicht erstellt werden.', 'warning', 5000);
});
diff --git a/pages/list.js b/pages/list.js
index 3d410e1..84dcbae 100644
--- a/pages/list.js
+++ b/pages/list.js
@@ -38,7 +38,8 @@ function PublicTournaments(props) {