oneday-core
Advanced tools
Comparing version 1.0.30 to 1.0.31
@@ -31,3 +31,3 @@ const aws = require('aws-sdk'); | ||
} else { | ||
return null; | ||
return []; | ||
} | ||
@@ -45,8 +45,8 @@ } | ||
} else { | ||
return null; | ||
return []; | ||
} | ||
} | ||
return filtered; | ||
return [filtered]; | ||
} | ||
return result.Item; | ||
return [result.Item]; | ||
} | ||
@@ -53,0 +53,0 @@ |
module.exports.role = { | ||
CONSUMER: 'consumer', | ||
ADMIN: 'admin', | ||
ACCOUNT_ADMIN: 'account_admin', | ||
UBER_ADMIN: 'uber_admin' | ||
ACCOUNT_ADMIN: 'accountAdmin', | ||
UBER_ADMIN: 'uberAdmin' | ||
}; | ||
@@ -7,0 +7,0 @@ |
@@ -7,3 +7,3 @@ 'use strict'; | ||
const sns = new aws.SNS({region: process.env.region}); | ||
const uuid = require('uuid'); | ||
const uuid = require('uuid/v4'); | ||
const db = require('./db'); | ||
@@ -64,3 +64,3 @@ const util = require('./util'); | ||
Item: { | ||
id: uuid.v1(), | ||
id: uuid(), | ||
requestId: requestId, | ||
@@ -120,3 +120,3 @@ function: type, | ||
function getRequestId(event) { | ||
return event.requestContext.authorizer !== undefined && event.requestContext.authorizer.requestId !== undefined ? event.requestContext.authorizer.requestId : uuid.v1(); | ||
return event.requestContext.authorizer !== undefined && event.requestContext.authorizer.requestId !== undefined ? event.requestContext.authorizer.requestId : uuid(); | ||
} | ||
@@ -123,0 +123,0 @@ |
{ | ||
"name": "oneday-core", | ||
"version": "1.0.30", | ||
"version": "1.0.31", | ||
"description": "Basic AWS util functions to ease development.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -11,2 +11,3 @@ /* | ||
adminCanAddUsers: false, | ||
accountAdminCanAddUsers: true, | ||
invitationValidityDays: 7 | ||
@@ -13,0 +14,0 @@ }; |
19811
532