mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
moved image uploading to a require js module, added image upload to site logo
This commit is contained in:
10
src/posts.js
10
src/posts.js
@@ -177,10 +177,16 @@ var RDB = require('./redis.js'),
|
||||
multi.exec(function (err, replies) {
|
||||
async.map(replies, function(postData, _callback) {
|
||||
if (postData) {
|
||||
postData.relativeTime = new Date(parseInt(postData.timestamp,10)).toISOString();
|
||||
|
||||
postData.post_rep = postData.reputation;
|
||||
postData['edited-class'] = postData.editor !== '' ? '' : 'none';
|
||||
postData['relativeEditTime'] = postData.edited !== '0' ? (new Date(parseInt(postData.edited,10)).toISOString()) : '';
|
||||
try {
|
||||
postData.relativeTime = new Date(parseInt(postData.timestamp,10)).toISOString();
|
||||
postData['relativeEditTime'] = postData.edited !== '0' ? (new Date(parseInt(postData.edited,10)).toISOString()) : '';
|
||||
} catch(e) {
|
||||
winston.err('invalid time value');
|
||||
}
|
||||
|
||||
|
||||
if (postData.uploadedImages) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user