small typographical and minor changes

merge-requests/208/head
fatchan 5 years ago
parent ddfe6241b5
commit 392d2c8199
  1. 18
      helpers/build.js
  2. 2
      models/forms/makepost.js
  3. 6
      redis.js

@ -31,9 +31,9 @@ module.exports = {
...options, ...options,
threads, threads,
}, { }, {
'name': `/${options.board._id}/catalog.json`, 'name': `/${options.board._id}/catalog.json`,
'data': threads 'data': threads
}); });
const end = process.hrtime(start); const end = process.hrtime(start);
console.log(timeDiffString(label, end)); console.log(timeDiffString(label, end));
return html; return html;
@ -53,9 +53,9 @@ module.exports = {
...options, ...options,
thread, thread,
}, { }, {
'name': `/${options.board._id}/thread/${options.threadId}.json`, 'name': `/${options.board._id}/thread/${options.threadId}.json`,
'data': thread 'data': thread
}); });
const end = process.hrtime(start); const end = process.hrtime(start);
console.log(timeDiffString(label, end)); console.log(timeDiffString(label, end));
return html; return html;
@ -108,9 +108,9 @@ module.exports = {
maxPage, maxPage,
page: i, page: i,
}, { }, {
'name': `/${options.board._id}/${i === 1 ? 'index' : i}.json`, 'name': `/${options.board._id}/${i === 1 ? 'index' : i}.json`,
'data': pageThreads 'data': pageThreads
}) })
); );
} }
await Promise.all(buildArray); await Promise.all(buildArray);

@ -116,7 +116,7 @@ module.exports = async (req, res, next) => {
'ip': res.locals.ip, 'ip': res.locals.ip,
'reason': 'post word filter auto ban', 'reason': 'post word filter auto ban',
'board': res.locals.board._id, 'board': res.locals.board._id,
'post': null, 'posts': null,
'issuer': 'system', //what should i call this 'issuer': 'system', //what should i call this
'date': banDate, 'date': banDate,
'expireAt': banExpiry 'expireAt': banExpiry

@ -9,10 +9,8 @@ module.exports = {
redisClient: client, redisClient: client,
//get a value with key //get a value with key
get: async (key) => { get: (key) => {
return client.get(key).then(res => { return client.get(key).then(res => { return JSON.parse(res) });
return JSON.parse(res);
});
}, },
//set a value on key //set a value on key

Loading…
Cancel
Save