add author and class data to file

This commit is contained in:
casperlamboo 2017-11-07 13:01:47 +01:00
parent 5080402c85
commit 25727472c6

View File

@ -6,10 +6,12 @@ export default async function docToFile(db, doc, { image = false, sketch = false
// NOTE doc.appVersion can be used to check in which version of the app the file was saved in // NOTE doc.appVersion can be used to check in which version of the app the file was saved in
const response = { const response = {
name: doc.name, name: doc.name,
author: doc.author,
id: doc._id, id: doc._id,
createdOn: doc.createdOn, createdOn: doc.createdOn,
updatedOn: doc.updatedOn updatedOn: doc.updatedOn
}; };
if (doc.class) response.class;
const { appVersion } = doc; const { appVersion } = doc;