Add data fields to collections

This commit is contained in:
Krzysztof Janda
2020-04-11 20:24:51 +02:00
parent c99910750f
commit fe3cca5344
2 changed files with 80 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ import { cockpitApiRequest } from './GenericFunctions';
export async function createCollectionEntry(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, resourceName: string, data: IDataObject, id?: string): Promise<any> { // tslint:disable-line:no-any
const body: ICollection = {
data: JSON.parse(data.toString())
data,
};
if (id) {