Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createBodyOfPostStorage(folderId, fileName) {
// create a new storage for the ouput item version
let createStorage = new CreateStorage();
let storageRelationshipsTargetData = new StorageRelationshipsTargetData("folders", folderId);
let storageRelationshipsTarget = new StorageRelationshipsTarget;
let createStorageDataRelationships = new CreateStorageDataRelationships();
let createStorageData = new CreateStorageData();
let createStorageDataAttributes = new CreateStorageDataAttributes();
createStorageDataAttributes.name = fileName;
storageRelationshipsTarget.data = storageRelationshipsTargetData;
createStorageDataRelationships.target = storageRelationshipsTarget;
createStorageData.relationships = createStorageDataRelationships;
createStorageData.type = 'objects';
createStorageData.attributes = createStorageDataAttributes;
createStorage.data = createStorageData;
return createStorage;
}