idea-toolbox
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -34,4 +34,5 @@ /** | ||
* @param tables optional; the DynamoDB tables involved | ||
* @param resourceId optional; if set, the resourceId is chosen instead of proxy+ (default) | ||
*/ | ||
constructor(event: any, callback: any, project: string, tables?: string); | ||
constructor(event: any, callback: any, project: string, tables?: string, resourceId?: string); | ||
handleRequest: () => void; | ||
@@ -38,0 +39,0 @@ /** |
@@ -19,4 +19,5 @@ "use strict"; | ||
* @param tables optional; the DynamoDB tables involved | ||
* @param resourceId optional; if set, the resourceId is chosen instead of proxy+ (default) | ||
*/ | ||
constructor(event, callback, project, tables) { | ||
constructor(event, callback, project, tables, resourceId) { | ||
/// | ||
@@ -88,4 +89,4 @@ /// REQUEST HANDLERS | ||
this.httpMethod = event.httpMethod; | ||
this.resourceId = event.pathParameters && event.pathParameters.proxy | ||
? decodeURIComponent(event.pathParameters.proxy) : ''; | ||
this.resourceId = event.pathParameters && event.pathParameters[resourceId || 'proxy'] | ||
? decodeURIComponent(event.pathParameters[resourceId || 'proxy']) : ''; | ||
this.queryParams = event.queryStringParameters || {}; | ||
@@ -92,0 +93,0 @@ this.body = JSON.parse(event.body) || {}; |
{ | ||
"name": "idea-toolbox", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "IDEA's utility functions", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -41,4 +41,5 @@ /** | ||
* @param tables optional; the DynamoDB tables involved | ||
* @param resourceId optional; if set, the resourceId is chosen instead of proxy+ (default) | ||
*/ | ||
constructor(event: any, callback: any, project: string, tables?: string) { | ||
constructor(event: any, callback: any, project: string, tables?: string, resourceId?: string) { | ||
this.utils.logger('START', null, event, true); | ||
@@ -51,6 +52,6 @@ | ||
this.principalId = this.claims ? this.claims.sub : null; | ||
this.httpMethod = event.httpMethod; | ||
this.resourceId = event.pathParameters && event.pathParameters.proxy | ||
? decodeURIComponent(event.pathParameters.proxy) : ''; | ||
this.resourceId = event.pathParameters && event.pathParameters[resourceId || 'proxy'] | ||
? decodeURIComponent(event.pathParameters[resourceId || 'proxy']) : ''; | ||
this.queryParams = event.queryStringParameters || {}; | ||
@@ -57,0 +58,0 @@ this.body = JSON.parse(event.body) || {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90330
2358