2496ec09a4
* Files based collections skeleton * listing file based cards * create new entry with collection * moved lookupEntry to main backend * Editing single page Collections file * List widget basic implementation * Adjustments for test-repo * check if value exists before trying to iterate over
13 lines
427 B
JavaScript
13 lines
427 B
JavaScript
export function createEntry(collection, slug = '', path = '', options = {}) {
|
|
const returnObj = {};
|
|
returnObj.collection = collection;
|
|
returnObj.slug = slug;
|
|
returnObj.path = path;
|
|
returnObj.partial = options.partial || false;
|
|
returnObj.raw = options.raw || '';
|
|
returnObj.data = options.data || {};
|
|
returnObj.label = options.label || null;
|
|
returnObj.metaData = options.metaData || null;
|
|
return returnObj;
|
|
}
|