Remove or update some no longer relevant todos.

re: the captcha one, roundrobin = too fast expiring, sampling expireAfter $gte some time = possible to not get returned a captcha. so stucking with random. been working fine.
merge-requests/341/head
Thomas Lynch 2 years ago
parent 21006b9f5b
commit 4022999966
Signed by: fatchan
GPG Key ID: 112884AA57DF40B1
  1. 2
      lib/build/tasks.js
  2. 1
      models/forms/actionhandler.js
  3. 1
      models/forms/create.js
  4. 1
      models/forms/deleteaccounts.js
  5. 1
      models/forms/editpost.js
  6. 1
      models/pages/captcha.js
  7. 2
      models/pages/manage/logs.js

@ -16,8 +16,6 @@ const timeUtils = require(__dirname+'/../converter/timeutils.js')
module.exports = {
gulp: async (options) => {
/* TODO: calculate differences in oldsettings vsnewsettings in globalmanagesettings model
and send task options with list of tasks instead of always doing all */
const label = `running gulp tasks [${options.tasks.join(', ')}] after global config change`;
const start = process.hrtime();
gulp.series(options.tasks.map(t => buildTasks[t]), () => {

@ -458,7 +458,6 @@ module.exports = async (req, res, next) => {
/*
Get a minimal data of the threads for each affected board, used to get the page of a thread later.
Using the proper ordering of threads, to account for sticky, bumplocks, etc.
Todo: this even worth it or just rebuilding all pages is quicker instead?
*/
const pageBounds = threadsEachBoard.reduce((acc, t) => {
if (!acc[t.board]) { acc[t.board] = { first: null, last: null }; }

@ -37,7 +37,6 @@ module.exports = async (req, res) => {
});
}
//todo: add a settings for defaults
const newBoard = {
'_id': uri,
owner,

@ -49,7 +49,6 @@ module.exports = async (req, res) => {
}
});
cache.del(acc.ownedBoards.map(b => `board:${b}`));
//todo: use list of board with no owners for claims
}
}
await Boards.db.bulkWrite(bulkWrites);

@ -55,7 +55,6 @@ todo: handle some more situations
//new message and quotes
const nomarkup = prepareMarkdown(req.body.message, false);
const { message, quotes, crossquotes } = await messageHandler(nomarkup, req.body.board, post.thread, res.locals.permissions);
//todo: email and subject (probably dont need any transformation since staff bypass limits on forceanon, and it doesnt have to account for sage/etc
//intersection/difference of quotes sets for linking and unlinking
const oldQuoteIds = post.quotes.map(q => q._id.toString());

@ -28,7 +28,6 @@ module.exports = async (req, res, next) => {
}
const captchaCount = await Captchas.db.estimatedDocumentCount();
if (captchaCount >= captchaOptions.generateLimit) {
//TODOs: round robin sample? store in redis? only sample random with longer than x expiry?
const captchaSample = await Captchas.randomSample();
const randomCaptcha = captchaSample[0];
captchaId = randomCaptcha._id;

@ -21,7 +21,6 @@ module.exports = async (req, res, next) => {
if (uri) {
filter.board = uri;
}
//todo fetch log entry by id and then get ip and hash
let logs, maxPage;
try {
@ -43,7 +42,6 @@ module.exports = async (req, res, next) => {
uri,
permissions: res.locals.permissions,
viewRawIp: res.locals.permissions.get(Permissions.VIEW_RAW_IP),
//posterid here
logs,
page,
maxPage,

Loading…
Cancel
Save