feat: auth + storage config improvements

This commit is contained in:
NGPixel
2018-07-01 19:50:42 -04:00
parent bb102c3356
commit 4643336e9d
35 changed files with 818 additions and 354 deletions

17
server/helpers/common.js Normal file
View File

@@ -0,0 +1,17 @@
const _ = require('lodash')
module.exports = {
/**
* Get default value of type
*
* @param {any} Type Primitive Type
* @returns Default value
*/
getTypeDefaultValue (Type) {
if (_.isArray(Type)) {
return _.head(Type)
} else {
return new Type()
}
}
}