Add data fields to forms

This commit is contained in:
Krzysztof Janda
2020-04-11 20:24:58 +02:00
parent fe3cca5344
commit 348afdaf5c
2 changed files with 72 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import { cockpitApiRequest } from './GenericFunctions';
export async function submitForm(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resourceName: string, form: IDataObject) {
const body: IForm = {
form: JSON.parse(form.toString())
form
};
return cockpitApiRequest.call(this, 'post', `/forms/submit/${resourceName}`, body);