mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 12:02:48 +00:00
Cleanup; added more fields to DEFAULT_BREW
This commit is contained in:
@@ -1,30 +1,36 @@
|
||||
const _ = require('lodash');
|
||||
|
||||
// Default brew properties in most cases
|
||||
// Default properties for newly-created brews
|
||||
const DEFAULT_BREW = {
|
||||
text : '',
|
||||
editId : null,
|
||||
shareId : null,
|
||||
title : 'Untitled Brew',
|
||||
text : '',
|
||||
style : undefined,
|
||||
description : '',
|
||||
editId : undefined,
|
||||
shareId : undefined,
|
||||
createdAt : undefined,
|
||||
updatedAt : undefined,
|
||||
renderer : 'V3',
|
||||
theme : '5ePHB',
|
||||
authors : [],
|
||||
tags : [],
|
||||
systems : [],
|
||||
thumbnail : '',
|
||||
published : false,
|
||||
pageCount : 1,
|
||||
theme : '5ePHB'
|
||||
gDrive : false,
|
||||
trashed : false
|
||||
|
||||
};
|
||||
// Default brew properties for loading
|
||||
const DEFAULT_BREW_LOAD = {};
|
||||
_.defaults(DEFAULT_BREW_LOAD,
|
||||
// Default values for older brews with missing properties
|
||||
// e.g., missing "renderer" is assumed to be "legacy"
|
||||
const DEFAULT_BREW_LOAD = _.defaults(
|
||||
{
|
||||
renderer : 'legacy',
|
||||
published : true
|
||||
renderer : 'legacy',
|
||||
},
|
||||
DEFAULT_BREW);
|
||||
|
||||
module.exports = {
|
||||
DEFAULT_BREW,
|
||||
DEFAULT_BREW_LOAD
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user