Hi guys,
I have installed the React front-end into my project. I am very new to React…
There does not seem to be any documentation on how to execute a service. Would someone be able to share a code snippet of adding say a button to the homepage that activates a service.
e.g. from my services.ts file
Have a button that runs this:
import { CubaApp, FetchOptions } from "@cuba-platform/rest";
export type billing_AccountService_getBalanceForAccount_params = {
account: any;
};
export var restServices = {
billing_AccountService: {
getBalanceForAccount: (cubaApp: CubaApp, fetchOpts?: FetchOptions) => (
params: billing_AccountService_getBalanceForAccount_params
) => {
return cubaApp.invokeService(
"billing_AccountService",
"getBalanceForAccount",
params,
fetchOpts
);
}
}
};