[www] Collective & Person meta image

This commit is contained in:
Roman Timashev committed 2017-10-25 01:57:49 +03:00
1 parent 66ca7719fa
commit 2459c580ce
2 files changed
+39 -32

No files matched your search

+4
View File
@@ -24,6 +24,7 @@ class Teacher {
this.file = data.file
this.edu = data.edu
this.picture = data.picture
this.preview = data.preview
this.diploma = data.diploma
this.position = data.position
this.name = data.name
@@ -61,11 +62,14 @@ class Teacher {
const processProfile = async profile => {
const imageId = profile.picture
const previewId = profile.preview
const picture = await Image.findById(imageId)
const preview = await Image.findById(previewId)
return new Teacher({
...profile,
picture,
preview,
})
}