redis/redis-set-storage.js
function (req, res) {
            // Add items
            if (req.body.items instanceof Array) {
                self.removeItems(req.body.items, function (err, result) {
                    if (!err) {
                        res.json( result );
                    } else {
                        res.json(500, { error: err });
                    }
                });
            } else {
                res.json(500, { error: "No `items` array in request body" });
            }
        }
function (req, res) {
            // Add items
            if (req.body.items instanceof Array) {
                self.removeItems(req.body.items, function (err, result) {
                    if (!err) {
                        res.json( result );
                    } else {
                        res.json(500, { error: err });
                    }
                });
            } else {
                res.json(500, { error: "No `items` array in request body" });
            }
        }
function ( req , res ) { // Add items if ( req . body . items instanceof Array ) { self . removeItems ( req . body . items , function ( err , result ) { if ( ! err ) { res . json ( result ) ; } else { res . json ( 500 , { error : err } ) ; } } ) ; } else { res . json ( 500 , { error : "No `items` array in request body" } ) ; } }
Expects an JSON object in the request with an array of items called `items`.
Expects an JSON object in the request with an array of items called items .