New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nodebb-plugin-poll

Package Overview
Dependencies
Maintainers
5
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodebb-plugin-poll - npm Package Compare versions

Comparing version 3.1.2 to 3.1.3

26

lib/poll.js

@@ -35,10 +35,21 @@ 'use strict';

// async this bitch up
// Save asynchronously
async.parallel([
async.apply(async.each, pollData.options, (option, next) => {
async.series([
async.apply(NodeBB.db.setObject, `poll:${pollId}:options:${option.id}`, option),
async.apply(NodeBB.db.setAdd, `poll:${pollId}:options`, option.id),
], next);
}),
async.apply(async.series, [
// Save poll options in parallel
async.apply(
async.parallel,
pollData.options.map(
(option) => async.apply(NodeBB.db.setObject, `poll:${pollId}:options:${option.id}`, option)
),
),
// Add poll option id to option list synchronously
// To avoid race condition causing duplicate error
async.apply(
async.series,
pollData.options.map(
(option) => async.apply(NodeBB.db.setAdd, `poll:${pollId}:options`, option.id)
),
),
]),
async.apply(NodeBB.db.setObject, `poll:${pollId}`, poll),

@@ -49,2 +60,3 @@ async.apply(NodeBB.db.setObject, `poll:${pollId}:settings`, pollData.settings),

], (err) => {
if (err) {

@@ -51,0 +63,0 @@ return callback(err);

{
"name": "nodebb-plugin-poll",
"version": "3.1.2",
"version": "3.1.3",
"description": "NodeBB Poll Plugin",

@@ -5,0 +5,0 @@ "main": "library.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc