fix(BUG): signup is updated (#432)

This commit is contained in:
pal-sig 2021-12-02 18:30:51 +05:30 committed by GitHub
parent 28bf2fe3f7
commit 6b6070fd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,10 @@ const signup = async (
props: Props,
): Promise<SuccessResponse<undefined> | ErrorResponse> => {
try {
const response = await axios.post(`/user?email=${props.email}`);
const response = await axios.post(`/user`, {
email: props.email,
name: props.name,
});
return {
statusCode: 200,

View File

@ -55,8 +55,10 @@ const Signup = ({ loggedIn }: SignupProps): JSX.Element => {
first_name: formState.firstName,
email: formState.email,
};
const response = await signup({
email: JSON.stringify(payload),
email: payload.email.value,
name: payload.first_name.value,
});
if (response.statusCode === 200) {

View File

@ -1,3 +1,4 @@
export interface Props {
email: string;
name: string;
}