merge-requests/208/head
fatchan 5 years ago
parent 1552bd42a5
commit 2adb6dfa11
  1. 4
      models/forms/lockposts.js
  2. 1
      models/forms/make-post.js
  3. 4
      models/forms/sageposts.js
  4. 4
      models/forms/stickyposts.js

@ -3,12 +3,12 @@
module.exports = (posts) => { module.exports = (posts) => {
const filteredposts = posts.filter(post => { const filteredposts = posts.filter(post => {
return !post.locked return !post.thread && !post.locked
}) })
if (filteredposts.length === 0) { if (filteredposts.length === 0) {
return { return {
message: 'Post(s) already locked', message: 'No thread(s) to lock',
}; };
} }

@ -196,7 +196,6 @@ module.exports = async (req, res, next, numFiles) => {
'sticky': false, 'sticky': false,
'locked': false, 'locked': false,
'saged': false, 'saged': false,
'cyclic': false,
}; };
let postId; let postId;

@ -3,12 +3,12 @@
module.exports = (posts) => { module.exports = (posts) => {
const filteredposts = posts.filter(post => { const filteredposts = posts.filter(post => {
return !post.saged return !post.thread && !post.saged
}) })
if (filteredposts.length === 0) { if (filteredposts.length === 0) {
return { return {
message: 'Post(s) already saged', message: 'No thread(s) to sage',
}; };
} }

@ -3,12 +3,12 @@
module.exports = (posts) => { module.exports = (posts) => {
const filteredposts = posts.filter(post => { const filteredposts = posts.filter(post => {
return !post.sticky return !post.thread && !post.sticky
}) })
if (filteredposts.length === 0) { if (filteredposts.length === 0) {
return { return {
message: 'Post(s) already stickied', message: 'No thread(s) to sticky',
}; };
} }

Loading…
Cancel
Save