Got healthbars persisting data to the database

This commit is contained in:
Stefan Zermatten
2019-01-30 13:34:45 +02:00
parent f6b0c746cc
commit 80d369f0d4
8 changed files with 196 additions and 54 deletions

View File

@@ -0,0 +1,9 @@
export default function pickKeysAsOptional(schema, keys){
let newSchema = schema.pick(...keys);
let optionalSchema = {};
for (let i of keys){
optionalSchema[i] = {optional: true}
};
newSchema.extend(optionalSchema);
return newSchema;
};