[Update/bugfix] To get software version.(show it to the console for now.)

fix the error that was wrong amount arguments.
This commit is contained in:
Sakamoto Shiina
2024-08-08 16:36:40 +09:00
parent e9de5df8a5
commit e8fd6b724d
8 changed files with 66 additions and 8 deletions

View File

@@ -0,0 +1,22 @@
import {
useSoftwareVersion,
} from "@store";
import { useStdoutToPython } from "./useStdoutToPython";
export const useConfig = () => {
const {
updateSoftwareVersion,
} = useSoftwareVersion();
const { asyncStdoutToPython } = useStdoutToPython();
return {
getSoftwareVersion: () => {
asyncStdoutToPython({endpoint: "/config/version"});
},
updateSoftwareVersion: (payload) => {
updateSoftwareVersion(payload.data);
},
};
};