mirror of
https://github.com/strapi/strapi.git
synced 2026-01-07 20:58:16 +00:00
Fix init request
Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
parent
9532212e86
commit
c5441f1d61
@ -42,7 +42,9 @@ function App(props) {
|
||||
try {
|
||||
const requestURL = '/users-permissions/init';
|
||||
|
||||
const { hasAdmin } = await request(requestURL, { method: 'GET' });
|
||||
const { hasAdmin } = await request(requestURL, { method: 'GET' }, false, false, {
|
||||
noAuth: true,
|
||||
});
|
||||
const { data } = await request('/admin/init', { method: 'GET' });
|
||||
const { uuid } = data;
|
||||
|
||||
@ -86,9 +88,7 @@ function App(props) {
|
||||
<Switch>
|
||||
<Route
|
||||
path="/auth/:authType"
|
||||
render={routerProps => (
|
||||
<AuthPage {...routerProps} hasAdminUser={state.hasAdmin} />
|
||||
)}
|
||||
render={routerProps => <AuthPage {...routerProps} hasAdminUser={state.hasAdmin} />}
|
||||
exact
|
||||
/>
|
||||
<PrivateRoute path="/" component={Admin} />
|
||||
@ -108,10 +108,7 @@ export function mapDispatchToProps(dispatch) {
|
||||
return bindActionCreators({ getDataSucceeded }, dispatch);
|
||||
}
|
||||
|
||||
const withConnect = connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
);
|
||||
const withConnect = connect(null, mapDispatchToProps);
|
||||
|
||||
export default compose(withConnect)(App);
|
||||
export { App };
|
||||
|
||||
@ -135,7 +135,6 @@ const EditForm = forwardRef(
|
||||
};
|
||||
|
||||
const handleClick = async () => {
|
||||
console.log('click');
|
||||
const cropResult = await getCroppedResult();
|
||||
|
||||
setCropResult(cropResult);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user