From aac8ae2a9e84bc9f86713cd2ad80b78717ccd494 Mon Sep 17 00:00:00 2001 From: ddejongh Date: Mon, 15 Jun 2015 11:02:49 +0200 Subject: [PATCH] merged master --- js/app.js | 3 ++- js/components/header.js | 5 ++++- js/constants/application_constants.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/js/app.js b/js/app.js index 7b2b485e..a3b61520 100644 --- a/js/app.js +++ b/js/app.js @@ -19,7 +19,8 @@ fetch.defaults({ urlMap: ApiUrls, http: { headers: headers, - credentials: 'cors' + credentials: 'cors', + mode: 'cors-with-forced-preflight' }, fatalErrorHandler: (err) => { console.log(err); diff --git a/js/components/header.js b/js/components/header.js index 6c8145e6..44c25bdb 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -6,6 +6,8 @@ import Router from 'react-router'; import UserActions from '../actions/user_actions'; import UserStore from '../stores/user_store'; +import PieceListActions from '../actions/piece_list_actions'; + import Nav from 'react-bootstrap/lib/Nav'; import Navbar from 'react-bootstrap/lib/Navbar'; import DropdownButton from 'react-bootstrap/lib/DropdownButton'; @@ -38,6 +40,7 @@ let Header = React.createClass({ }, handleLoginSuccess(){ UserActions.fetchCurrentUser(); + PieceListActions.fetchPieceList(1, 10); }, render() { @@ -51,7 +54,7 @@ let Header = React.createClass({