Добавлен заголовок с Content-Type

This commit is contained in:
goodmice 2021-12-02 15:12:22 +05:00
parent c5a7470d34
commit 2c585ab227

View File

@ -13,19 +13,20 @@ import { PrivateRoute } from './components/Private'
//OpenAPI.BASE = 'http://localhost:3000' //OpenAPI.BASE = 'http://localhost:3000'
OpenAPI.TOKEN = localStorage['token'] OpenAPI.TOKEN = localStorage['token']
OpenAPI.HEADERS = {'Content-Type': 'application/json'}
export default function App() { export default function App() {
return ( return (
<ConfigProvider locale={locale}> <ConfigProvider locale={locale}>
<Router> <Router>
<Switch> <Switch>
<Route path="/login"> <Route path={'/login'}>
<Login /> <Login />
</Route> </Route>
<Route path="/register"> <Route path={'/register'}>
<Register /> <Register />
</Route> </Route>
<PrivateRoute path="/"> <PrivateRoute path={'/'}>
<Main /> <Main />
</PrivateRoute> </PrivateRoute>
</Switch> </Switch>