update to the group setting for adding/removing devices

This commit is contained in:
csawatzky 2025-04-29 14:04:08 -06:00
parent 68ec1217c6
commit acbd49b907
2 changed files with 118 additions and 28 deletions

View file

@ -88,7 +88,7 @@ export default function GroupProvider(props: PropsWithChildren<Props>) {
const addDevice = (group: number, device: number) => {
let url = "/groups/" + group + "/devices/" + device + "/add";
if (as) url = pondURL(url + as)
if (as) url = url + "?as=" + as
return new Promise<AxiosResponse>((resolve, reject) => {
post(pondURL(url), group).then(resp => {
return resolve(resp)
@ -100,7 +100,7 @@ export default function GroupProvider(props: PropsWithChildren<Props>) {
const removeDevice = (group: number, device: number) => {
let url = "/groups/" + group + "/devices/" + device + "/remove";
if (as) url = pondURL(url + as)
if (as) url = url + "?as=" + as
return new Promise<AxiosResponse>((resolve, reject) => {
post(pondURL(url), group).then(resp => {
return resolve(resp)