From 9c2c365da1edb2e2835d19303cdee81e53f3deb8 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 10 Apr 2023 14:43:30 +0700 Subject: fix reset password, register, search, suggest --- src/lib/auth/api/registerApi.js | 2 +- src/lib/auth/components/PersonalProfile.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/auth') diff --git a/src/lib/auth/api/registerApi.js b/src/lib/auth/api/registerApi.js index f3d75ce8..f9413f8c 100644 --- a/src/lib/auth/api/registerApi.js +++ b/src/lib/auth/api/registerApi.js @@ -1,6 +1,6 @@ import odooApi from '@/core/api/odooApi' -const registerApi = async ({ data }) => { +const registerApi = async ({ ...data }) => { const dataRegister = await odooApi('POST', '/api/v1/user/register', data) return dataRegister } diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx index 0b387f2e..4f606ed4 100644 --- a/src/lib/auth/components/PersonalProfile.jsx +++ b/src/lib/auth/components/PersonalProfile.jsx @@ -34,7 +34,7 @@ const PersonalProfile = () => { let data = values if (!values.password) delete data.password const isUpdated = await editPersonalProfileApi({ data }) - console.log(isUpdated) + if (isUpdated?.user) { setAuth(isUpdated.user) setValue('password', '') -- cgit v1.2.3