Now using endpoints returned from the gateway sec

This commit is contained in:
bourquecharles
2021-07-02 17:34:13 -04:00
parent 908a034433
commit c017fe0774
31 changed files with 110 additions and 80 deletions

View File

@@ -25,7 +25,7 @@ import styles from './index.module.scss';
const DeviceConfiguration = () => {
const { t } = useTranslation();
const { currentToken } = useAuth();
const { currentToken, endpoints } = useAuth();
const { deviceSerialNumber } = useDevice();
const [collapse, setCollapse] = useState(false);
const [showModal, setShowModal] = useState(false);
@@ -49,7 +49,7 @@ const DeviceConfiguration = () => {
};
axiosInstance
.get(`/device/${encodeURIComponent(deviceSerialNumber)}`, options)
.get(`${endpoints.ucentralgw}/api/v1/device/${encodeURIComponent(deviceSerialNumber)}`, options)
.then((response) => {
setDevice(response.data);
})