summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-10 20:32:20 +0800
committerWu Cheng-Han2016-10-10 20:32:20 +0800
commit3175616573a9346f8ae2731a8a963b28c42224c3 (patch)
tree8a899e1597dea0cf2502fe341a53bb46168d7c5d /lib
parent7a85d62b774ed6f26d0cfd772b4adf312c85f0ce (diff)
Update to support showing owner on the infobar
Diffstat (limited to '')
-rwxr-xr-xlib/response.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/response.js b/lib/response.js
index 796f951f..15b81176 100755
--- a/lib/response.js
+++ b/lib/response.js
@@ -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,