The frontend will now be an OAuth app, auto-authorized. The frontend will use an access token for API requests
Adding better errors for the API controllers, posting a simple status works from the frontend now
This commit is contained in:
13
app/assets/javascripts/components/reducers/meta.jsx
Normal file
13
app/assets/javascripts/components/reducers/meta.jsx
Normal file
@ -0,0 +1,13 @@
|
||||
import { SET_ACCESS_TOKEN } from '../actions/meta';
|
||||
import Immutable from 'immutable';
|
||||
|
||||
const initialState = Immutable.Map();
|
||||
|
||||
export default function meta(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case SET_ACCESS_TOKEN:
|
||||
return state.set('access_token', action.token);
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user