@campxdev/shared 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export default function ChangePassword({ close }) {
|
|
|
9
9
|
|
|
10
10
|
const onSubmit = async (formData) => {
|
|
11
11
|
try {
|
|
12
|
-
await axios.post('/auth/change-password', formData)
|
|
12
|
+
await axios.post('/auth-server/auth/change-password', formData)
|
|
13
13
|
toast.success('Password Changed Successfully')
|
|
14
14
|
} catch (error) {
|
|
15
15
|
axiosErrorToast(error)
|
|
@@ -38,9 +38,8 @@ export function LoginForm({ loginUrl }: { loginUrl?: string }) {
|
|
|
38
38
|
try {
|
|
39
39
|
const res = await axiosBase({
|
|
40
40
|
method: 'POST',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
: `https://api.campx.dev/auth-server/auth/login`,
|
|
41
|
+
baseURL: process.env.REACT_APP_API_HOST,
|
|
42
|
+
url: loginUrl ? loginUrl : `/auth-server/auth/login`,
|
|
44
43
|
data: values,
|
|
45
44
|
})
|
|
46
45
|
Cookies.set('campx_tenant', res?.data?.subDomain)
|
|
@@ -104,7 +104,7 @@ const DropDownMenu = ({ path, title, icon, menuItems }) => {
|
|
|
104
104
|
const validateDropdownAccess = () => {
|
|
105
105
|
if (process.env.NODE_ENV === 'development' && !permissions) return true
|
|
106
106
|
|
|
107
|
-
return menuItems?.
|
|
107
|
+
return menuItems?.some((item) =>
|
|
108
108
|
item?.permissionKey ? permissions[item.permissionKey] : accessIfNoKey,
|
|
109
109
|
)
|
|
110
110
|
}
|