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

nodecommons-rest

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodecommons-rest - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

2

dist/apis/commons-rest-wekhook.api.d.ts

@@ -6,4 +6,4 @@ import { TPropertyObject } from 'tscommons-core';

private path;
constructor(restServer: CommonsRestServer, path: string, namespace: string, hook: string);
constructor(restServer: CommonsRestServer, path: string, hook: string, namespace?: string);
protected abstract handle(data: TPropertyObject): Promise<string | never>;
}

@@ -16,6 +16,6 @@ "use strict";

class CommonsRestWebhookApi extends commons_rest_api_1.CommonsRestApi {
constructor(restServer, path, namespace, hook) {
constructor(restServer, path, hook, namespace) {
super(restServer);
this.path = path;
super.getHandler(`${this.path}${namespace}/${hook}`, (req, _res) => __awaiter(this, void 0, void 0, function* () {
super.getHandler(`${this.path}${namespace ? `${namespace}/` : ''}${hook}`, (req, _res) => __awaiter(this, void 0, void 0, function* () {
if (!tscommons_core_1.CommonsType.hasPropertyString(req.query, 'challenge')) {

@@ -28,3 +28,3 @@ return commons_rest_api_1.CommonsRestApi.badRequest('No challenge supplied');

}));
super.postHandler(`${this.path}${namespace}/${hook}`, (req, _res) => __awaiter(this, void 0, void 0, function* () {
super.postHandler(`${this.path}${namespace ? `${namespace}/` : ''}${hook}`, (req, _res) => __awaiter(this, void 0, void 0, function* () {
if (!tscommons_core_1.CommonsType.hasPropertyObject(req, 'body')) {

@@ -31,0 +31,0 @@ return commons_rest_api_1.CommonsRestApi.badRequest('No JSON body supplied');

{
"name": "nodecommons-rest",
"version": "2.4.1",
"version": "2.4.2",
"description": "",

@@ -5,0 +5,0 @@ "scripts": {

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