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

pg-challenges

Package Overview
Dependencies
Maintainers
3
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg-challenges - npm Package Compare versions

Comparing version 2.1.1 to 2.2.0

lib/queries/search.js

11

example/server.js

@@ -170,2 +170,13 @@ 'use strict';

}
}, {
method: 'GET',
path: '/challengesSearch',
handler: function (request, reply) {
var searchTerm = request.query.searchTerm;
request.server.methods.pg.challenges.challengesSearch(searchTerm, function (error, response) { // eslint-disable-line
Hoek.assert(!error, 'challengesSearch failed');
reply(response);
});
}
}

@@ -172,0 +183,0 @@ ]);

@@ -101,3 +101,9 @@ 'use strict';

var challengesSearch = function (searchTerm, cb) {
query(queries.challengesSearch(searchTerm), pool, function (queryErr, res) {
return cb(queryErr, res.rows);
});
};
query(initQuery, pool, function (initErr) {

@@ -116,2 +122,3 @@ if (initErr) {

server.method('pg.challenges.getArchived', getArchived);
server.method('pg.challenges.challengesSearch', challengesSearch);

@@ -118,0 +125,0 @@ return next();

4

lib/queries/index.js

@@ -12,2 +12,3 @@ 'use strict';

var getArchived = require('./getArchived.js');
var challengesSearch = require('./search.js');

@@ -23,3 +24,4 @@ module.exports = {

getMatchingOrgs: getMatchingOrgs,
getArchived: getArchived
getArchived: getArchived,
challengesSearch: challengesSearch
};
{
"name": "pg-challenges",
"version": "2.1.1",
"version": "2.2.0",
"description": "Reusable challenges-system build with Postgres and Hapi.",

@@ -27,5 +27,5 @@ "main": "lib/index.js",

"boom": "^4.2.0",
"ce100-mock-data": "^1.0.6",
"ce100-mock-data": "^1.1.2",
"env2": "^2.1.1",
"hapi": "^16.6.0",
"hapi": "^15.2.0",
"hoek": "^4.1.0",

@@ -41,3 +41,3 @@ "istanbul": "^0.4.5",

"nodemon": "^1.11.0",
"pg-people": "0.0.31",
"pg-people": "0.1.6",
"pre-commit": "^1.1.3",

@@ -44,0 +44,0 @@ "tags-system": "^1.0.7",

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