indent and style fixes

merge-requests/208/head
fatchan 5 years ago
parent 0373ba610c
commit de953fd8cf
  1. 4
      controllers/forms.js
  2. 9
      gulp/res/css/style.css
  3. 16
      helpers/checks/spamcheck.js
  4. 1
      models/forms/makepost.js

@ -250,8 +250,8 @@ router.post('/board/:board/post', Boards.exists, banCheck, postFiles, paramConve
if (flood) {
deleteTempFiles(req).catch(e => console.error);
return res.status(429).render('message', {
'title': 'Too many requests',
'message': 'Flood detected',
'title': 'Flood detected',
'message': 'Please wait before making another post, or a post similar to another user',
'redirect': `/${req.params.board}${req.body.thread ? '/thread/' + req.body.thread + '.html' : ''}`
});
}

@ -110,11 +110,6 @@ object {
align-items: center;
}
.navbar {
border-bottom: 1px solid #a9a9a9;
background: #d6daf0;
}
.catalog-tile {
padding: 5px;
margin: 2px;
@ -450,7 +445,7 @@ textarea {
.post-container.op {
background: none;
border: none;
border-color: transparent;
width: 100%;
}
@ -520,8 +515,6 @@ textarea {
flex-shrink: 0;
margin-top: auto;
line-height: 30px;
border-top: 1px solid #a9a9a9;
background: #d6daf0;
}
input[type="text"], input[type="submit"], input[type="password"], input[type="file"], textarea {

@ -20,14 +20,14 @@ module.exports = async (req, res) => {
const contentOr = [];
if (res.locals.numFiles > 0) {
contentOr.push({
'files': {
'files': {
'$elemMatch': {
'hash': { //any file hash will match, doesnt need to be all
'$in': req.files.file.map(f => f.sha256)
}
'hash': { //any file hash will match, doesnt need to be all
'$in': req.files.file.map(f => f.sha256)
}
}
}
});
}
});
}
if (req.body.message) {
contentOr.push({
@ -58,8 +58,8 @@ module.exports = async (req, res) => {
})
let flood = await Posts.db.find({
'$or': ors
}).toArray();
'$or': ors
}).toArray();
return flood.length > 0;

@ -304,6 +304,7 @@ console.log(`NEW POST -> ${successRedirect}`);
} else {
//new thread, prunes any old threads before rebuilds
const prunedThreads = await Posts.pruneOldThreads(req.params.board, res.locals.board.settings.threadLimit);
//TODO: could add early404 here alongside thread pruning.
if (prunedThreads.length > 0) {
await deletePosts(prunedThreads, req.params.board);
}

Loading…
Cancel
Save