fix: added back missing topic thumb tests that were removed in last commit

This commit is contained in:
Julian Lam
2020-12-04 16:42:39 -05:00
parent 5ec3b3d083
commit c043cfebd6
4 changed files with 34 additions and 4 deletions

View File

@@ -94,13 +94,13 @@ Topics.getThumbs = async (req, res) => {
helpers.formatApiResponse(200, res, await topics.thumbs.get(req.params.tid));
};
Topics.addThumb = async (req, res, next) => {
Topics.addThumb = async (req, res) => {
await checkThumbPrivileges({ tid: req.params.tid, uid: req.user.uid, res });
if (res.headersSent) {
return;
}
const files = await uploadsController.uploadThumb(req, res, next); // response is handled here
const files = await uploadsController.uploadThumb(req, res); // response is handled here
// Add uploaded files to topic zset
if (files && files.length) {