Show v1 project owner name

This commit is contained in:
Alasdair Smith
2017-11-23 17:10:42 +00:00
parent e2b1ced267
commit 099305d909
2 changed files with 10 additions and 2 deletions

View File

@@ -396,8 +396,13 @@ module.exports = ProjectController =
id: project.id
name: project.title
lastUpdated: new Date(project.updated_at * 1000) # Convert from epoch
accessLevel: "readOnly",
accessLevel: if project.owner?.user_is_owner then "owner" else "readOnly"
archived: project.removed || project.archived
owner: {
# Unlisted V1 projects don't have an owner, so just show N/A
first_name: if project.owner then project.owner.name else 'N/A'
last_name: ''
}
isV1Project: true
}