update to mine api for as to be passed in to the functions
This commit is contained in:
parent
022837de87
commit
9b9f4cdf63
9 changed files with 50 additions and 34 deletions
|
|
@ -111,14 +111,14 @@ export default function Editor(props: Props) {
|
|||
undefined | Map<string, UnitMeasurement[]>
|
||||
>(undefined);
|
||||
|
||||
const [{ user }] = useGlobalState();
|
||||
const [{ user, as }] = useGlobalState();
|
||||
|
||||
const save = () => {
|
||||
let settings = pond.MineSettings.create();
|
||||
props.devices.forEach(device => {
|
||||
if (device.settings) settings.devices.push(device.settings?.deviceId);
|
||||
});
|
||||
mineAPI.addMine(settings).then((resp: any) => {
|
||||
mineAPI.addMine(settings, as).then((resp: any) => {
|
||||
console.log(resp);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue