Merge branch 'dev_environment' of gitlab.com:brandx/bxt-app into dev_environment

This commit is contained in:
Carter 2025-03-06 14:34:56 -06:00
commit 2c859d9de9
3 changed files with 36 additions and 10 deletions

View file

@ -173,11 +173,20 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
let url = pondURL(
"/devices/" +
id +
"?as=" + as +
(keys ? "&keys=" + keys.toString() : "") +
(keys ? "?keys=" + keys.toString() : "") +
(types ? "&types=" + types.toString() : ""),
demo
);
if (as) {
url = pondURL(
"/devices/" +
id +
"?as=" + as +
(keys ? "&keys=" + keys.toString() : "") +
(types ? "&types=" + types.toString() : ""),
demo
);
}
return new Promise<AxiosResponse<pond.Device>>((resolve, reject) => {
get<pond.Device>(url).then(resp => {
resp.data = pond.Device.fromObject(resp.data)
@ -498,11 +507,19 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
let url = pondURL(
"/devices/" +
id +
"/componentPreferences?as=" +
as +
(keys ? "&keys=" + keys.toString() : "") +
"/componentPreferences" +
(keys ? "?keys=" + keys.toString() : "") +
(types ? "&types=" + types.toString() : "")
)
if (as) {
url = pondURL(
"/devices/" +
id +
"/componentPreferences?as=" + as +
(keys ? "&keys=" + keys.toString() : "") +
(types ? "&types=" + types.toString() : "")
)
}
return new Promise<AxiosResponse<pond.ListDeviceComponentPreferencesResponse>>((resolve, reject) => {
get<pond.ListDeviceComponentPreferencesResponse>(url).then(resp => {
resp.data = pond.ListDeviceComponentPreferencesResponse.fromObject(resp.data)