update to mine api for as to be passed in to the functions

This commit is contained in:
csawatzky 2025-04-21 13:24:26 -06:00
parent 022837de87
commit 9b9f4cdf63
9 changed files with 50 additions and 34 deletions

View file

@ -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);
});
};