Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-user-local-basic

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-user-local-basic - npm Package Compare versions

Comparing version 0.0.1-alpha.1 to 0.0.1-alpha.2

112

lib/ExpressUserLocalBasic.js

@@ -199,2 +199,101 @@ //Copyright (c) 2015 Eric Vallee <eric_vallee2003@yahoo.ca>

ResponseRoutes['NoSessionUser'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="NoSessionUser")
{
Res.status(401).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['NoAuth'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="NoAuth")
{
Res.status(401).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['BadField'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="BadField")
{
Res.status(400).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['NoID'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="NoID")
{
Res.status(400).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['NoField'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="NoField")
{
Res.status(400).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['PrivateField'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="PrivateField")
{
Res.status(401).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['InvalidAuth'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="InvalidAuth")
{
Res.status(401).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['BadBody'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="BadBody")
{
Res.status(400).end();
}
else
{
Next(Err);
}
}
ResponseRoutes['NoAuto'] = function(Err, Req, Res, Next) {
if(Err.Type && Err.Type==="NoAuto")
{
Res.status(400).end();
}
else
{
Next(Err);
}
}
module.exports = function(Options) {

@@ -236,4 +335,5 @@ var Roles = Options && Options.Roles ? Options.Roles : {'Edit': ['Admin'], 'Delete': ['Admin'], 'Get': ['Admin']};

Router.use('/User/Self', ResponseRoutes['UserPatchErr']);
Router.post('/User/:Field/:ID/:SetField', ResponseRoutes.UserPatch(SendEmail));
Router.use('/User/:Field/:ID/:SetField', ResponseRoutes['UserPatchErr']);
Router.post('/User/:Field/:ID/Recovery/:SetField', ResponseRoutes.UserPatch(SendEmail));
Router.use('/User/:Field/:ID/Recovery/:SetField', ResponseRoutes['UserPatchErr']);
Router.use('/User/:Field/:ID/Recovery/:SetField', ResponseRoutes['NoAuto']);
Router.put('/User/Self/Memberships/:Membership', ResponseRoutes.UserMembershipsPut);

@@ -272,2 +372,10 @@ Router.use('/User/Self/Memberships/:Membership', ResponseRoutes.UserMembershipsPutErr);

Router.use('/', ResponseRoutes['NotValidatedErr']);
Router.use('/', ResponseRoutes['NoSessionUser']);
Router.use('/', ResponseRoutes['NoAuth']);
Router.use('/', ResponseRoutes['BadField']);
Router.use('/', ResponseRoutes['NoID']);
Router.use('/', ResponseRoutes['NoField']);
Router.use('/', ResponseRoutes['PrivateField']);
Router.use('/', ResponseRoutes['InvalidAuth']);
Router.use('/', ResponseRoutes['BadBody']);
};

@@ -274,0 +382,0 @@ };

2

package.json
{
"name": "express-user-local-basic",
"version": "0.0.1-alpha.1",
"version": "0.0.1-alpha.2",
"description": "Basic response handler for express-user-local.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -21,1 +21,7 @@ Express-User-Local-Basic

Initial prototype
0.0.1-alpha.2
-------------
- Updated library to be compatible with route change in the 0.0.1-alpha.15 version of express-user
- Updated library to handle response feedback from version 0.0.1-alpha.12 of express-user-local

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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