Change /me to /user and allow email changes
This commit is contained in:
@@ -28,7 +28,7 @@ function App() {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
requester('/me/', 'GET', token)
|
||||
requester('/user/', 'GET', token)
|
||||
.then(res => {
|
||||
console.log(res);
|
||||
setUserCache(res);
|
||||
@@ -49,6 +49,7 @@ function App() {
|
||||
<Router>
|
||||
<div className='content-wrap'>
|
||||
<div className='content-wrap-inside'>
|
||||
|
||||
<Container>
|
||||
<div className='hero'>
|
||||
<img src='/logo-long.svg' className='logo-long' />
|
||||
@@ -176,6 +177,7 @@ function App() {
|
||||
</Route>
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
//import * as serviceWorker from './serviceWorker';
|
||||
|
||||
ReactDOM.render(<App />, document.getElementById('root'));
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
// Learn more about service workers: https://bit.ly/CRA-PWA
|
||||
serviceWorker.unregister();
|
||||
// serviceWorker.unregister();
|
||||
|
@@ -55,6 +55,10 @@ export const requester = (route, method, token, data) => {
|
||||
} else if (code >= 400 && code < 500) {
|
||||
return error.data.json()
|
||||
.then(result => {
|
||||
if (result.detail == 'Invalid token.') {
|
||||
localStorage.clear();
|
||||
window.location = '/';
|
||||
}
|
||||
throw customError(result);
|
||||
});
|
||||
} else if (code >= 500 && code < 600) {
|
||||
|
Reference in New Issue
Block a user