Update to support showing owner on the infobar

This commit is contained in:
Wu Cheng-Han
2016-10-10 20:32:20 +08:00
parent 7a85d62b77
commit 3175616573
6 changed files with 55 additions and 8 deletions

View File

@@ -205,6 +205,9 @@ function showPublishNote(req, res, next) {
url: origin,
body: text,
useCDN: config.usecdn,
owner: note.owner ? note.owner.id : null,
ownerprofile: note.owner ? models.User.parseProfile(note.owner.profile) : null,
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,
lastchangeuserprofile: note.lastchangeuser ? models.User.parseProfile(note.lastchangeuser.profile) : null,
robots: meta.robots || false, //default allow robots
GA: meta.GA,
@@ -576,6 +579,9 @@ function showPublishSlide(req, res, next) {
slides: slides,
meta: JSON.stringify(obj.meta || {}),
useCDN: config.usecdn,
owner: note.owner ? note.owner.id : null,
ownerprofile: note.owner ? models.User.parseProfile(note.owner.profile) : null,
lastchangeuser: note.lastchangeuser ? note.lastchangeuser.id : null,
lastchangeuserprofile: note.lastchangeuser ? models.User.parseProfile(note.lastchangeuser.profile) : null,
robots: meta.robots || false, //default allow robots
GA: meta.GA,