updated as in the interactions api
This commit is contained in:
parent
e8e32e1886
commit
c617ebf868
12 changed files with 66 additions and 50 deletions
|
|
@ -134,7 +134,7 @@ export default function InteractionSettings(props: Props) {
|
|||
const prevComponents = usePrevious(components);
|
||||
const prevInitialComponent = usePrevious(initialComponent);
|
||||
const classes = useStyles();
|
||||
const [{ user }] = useGlobalState();
|
||||
const [{ user, as }] = useGlobalState();
|
||||
const interactionsAPI = useInteractionsAPI();
|
||||
const [interaction, setInteraction] = useState<Interaction>(
|
||||
Interaction.clone(initialInteraction)
|
||||
|
|
@ -307,7 +307,7 @@ export default function InteractionSettings(props: Props) {
|
|||
switch (mode) {
|
||||
case "add":
|
||||
interactionsAPI
|
||||
.addInteraction(Number(device.settings.deviceId), settings)
|
||||
.addInteraction(Number(device.settings.deviceId), settings, as)
|
||||
.then(() => {
|
||||
success("Interaction was successfully created");
|
||||
refreshCallback();
|
||||
|
|
@ -320,7 +320,7 @@ export default function InteractionSettings(props: Props) {
|
|||
let s = pond.InteractionPondSettings.create();
|
||||
s.sortPriority = interaction.settings.sortPriority;
|
||||
interactionsAPI
|
||||
.updateInteractionPondSettings(Number(device.settings.deviceId), interaction.key(), s)
|
||||
.updateInteractionPondSettings(Number(device.settings.deviceId), interaction.key(), s, as)
|
||||
.then(() => {
|
||||
success("Interaction pond settings were successfully updated");
|
||||
refreshCallback();
|
||||
|
|
@ -329,7 +329,7 @@ export default function InteractionSettings(props: Props) {
|
|||
.finally(() => close());
|
||||
} else {
|
||||
interactionsAPI
|
||||
.updateInteraction(Number(device.settings.deviceId), settings)
|
||||
.updateInteraction(Number(device.settings.deviceId), settings, as)
|
||||
.then(() => {
|
||||
success("Interaction was successfully updated");
|
||||
refreshCallback();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue