From 392d2c8199e92d9e413c170492f766c89fb9ef88 Mon Sep 17 00:00:00 2001 From: fatchan Date: Tue, 3 Sep 2019 05:38:41 +0000 Subject: [PATCH] small typographical and minor changes --- helpers/build.js | 18 +++++++++--------- models/forms/makepost.js | 2 +- redis.js | 6 ++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/helpers/build.js b/helpers/build.js index 5cc5d144..bb7d17d8 100644 --- a/helpers/build.js +++ b/helpers/build.js @@ -31,9 +31,9 @@ module.exports = { ...options, threads, }, { - 'name': `/${options.board._id}/catalog.json`, - 'data': threads - }); + 'name': `/${options.board._id}/catalog.json`, + 'data': threads + }); const end = process.hrtime(start); console.log(timeDiffString(label, end)); return html; @@ -53,9 +53,9 @@ module.exports = { ...options, thread, }, { - 'name': `/${options.board._id}/thread/${options.threadId}.json`, - 'data': thread - }); + 'name': `/${options.board._id}/thread/${options.threadId}.json`, + 'data': thread + }); const end = process.hrtime(start); console.log(timeDiffString(label, end)); return html; @@ -108,9 +108,9 @@ module.exports = { maxPage, page: i, }, { - 'name': `/${options.board._id}/${i === 1 ? 'index' : i}.json`, - 'data': pageThreads - }) + 'name': `/${options.board._id}/${i === 1 ? 'index' : i}.json`, + 'data': pageThreads + }) ); } await Promise.all(buildArray); diff --git a/models/forms/makepost.js b/models/forms/makepost.js index 4580a84f..e621d153 100644 --- a/models/forms/makepost.js +++ b/models/forms/makepost.js @@ -116,7 +116,7 @@ module.exports = async (req, res, next) => { 'ip': res.locals.ip, 'reason': 'post word filter auto ban', 'board': res.locals.board._id, - 'post': null, + 'posts': null, 'issuer': 'system', //what should i call this 'date': banDate, 'expireAt': banExpiry diff --git a/redis.js b/redis.js index 2dfc8324..cd05821b 100644 --- a/redis.js +++ b/redis.js @@ -9,10 +9,8 @@ module.exports = { redisClient: client, //get a value with key - get: async (key) => { - return client.get(key).then(res => { - return JSON.parse(res); - }); + get: (key) => { + return client.get(key).then(res => { return JSON.parse(res) }); }, //set a value on key