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

oauth-node-client

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth-node-client - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

17

dist/methods/getUserData/index.js

@@ -25,3 +25,8 @@ "use strict";

case 0:
_context.next = 2;
if (!_services.container.get(userId)) {
_context.next = 5;
break;
}
_context.next = 3;
return _services.axios.get(_constants.endPoints.getProfile, {

@@ -35,7 +40,13 @@ headers: {

case 2:
case 3:
data = _context.sent;
return _context.abrupt("return", data);
case 4:
case 5:
return _context.abrupt("return", {
code: 400,
message: "UserId not found in container."
});
case 6:
case "end":

@@ -42,0 +53,0 @@ return _context.stop();

2

package.json
{
"name": "oauth-node-client",
"version": "1.0.1",
"version": "1.0.2",
"description": "371Digital oAuth Node Client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,10 +5,17 @@ import { axios, container } from "services";

const getUserData = async (userId) => {
const data = await axios.get(endPoints.getProfile, {
headers: {
"x-access-token": container.get(userId)
}
}).then((res) => res.data);
return data;
if (container.get(userId)) {
const data = await axios.get(endPoints.getProfile, {
headers: {
"x-access-token": container.get(userId)
}
}).then((res) => res.data);
return data;
}
return {
code: 400,
message: "UserId not found in container."
}
};
export default getUserData;
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