update to the group setting for adding/removing devices
This commit is contained in:
parent
68ec1217c6
commit
acbd49b907
2 changed files with 118 additions and 28 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue