Fix AuthPage conflicts

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2020-07-08 11:56:22 +02:00
parent 6d2c50ca05
commit d692a61db3

View File

@ -1,6 +1,6 @@
import React, { useEffect, useReducer } from 'react'; import React, { useEffect, useReducer } from 'react';
import axios from 'axios'; import axios from 'axios';
import { camelCase, get, omit, upperFirst } from 'lodash'; import { camelCase, get, omit, upperFirst, pick } from 'lodash';
import { Redirect, useRouteMatch, useHistory } from 'react-router-dom'; import { Redirect, useRouteMatch, useHistory } from 'react-router-dom';
import { auth, useQuery } from 'strapi-helper-plugin'; import { auth, useQuery } from 'strapi-helper-plugin';
import { Padded } from '@buffetjs/core'; import { Padded } from '@buffetjs/core';
@ -207,12 +207,7 @@ const AuthPage = ({ hasAdmin }) => {
axios({ axios({
method: 'POST', method: 'POST',
url: 'https://analytics.strapi.io/register', url: 'https://analytics.strapi.io/register',
data: omit(modifiedData, [ data: pick(modifiedData, ['userInfo.email', 'userInfo.firstname']),
'userInfo.password',
'userInfo.confirmPassword',
'password',
'confirmPassword',
]),
}); });
} }
// Redirect to the homePage // Redirect to the homePage