Skip to content

Commit

Permalink
Merge pull request #23 from NYPL/qa
Browse files Browse the repository at this point in the history
Qa
  • Loading branch information
Daniel Appel committed Apr 4, 2019
2 parents 3178753 + 8dca4ec commit bccf078
Show file tree
Hide file tree
Showing 6 changed files with 1,142 additions and 68 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": "standard",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
}
}
2 changes: 1 addition & 1 deletion config/local.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ NYPL_CHECKOUT_REQUEST_API_URL=https://qa-platform.nypl.org/api/v0.1/checkout-req
NYPL_CHECKIN_REQUEST_API_URL=https://qa-platform.nypl.org/api/v0.1/checkin-requests-sync
NYPL_RECAP_REQUEST_API_URL=https://qa-platform.nypl.org/api/v0.1/recap/cancel-hold-requests
OAUTH_PROVIDER_URL=https://isso.nypl.org/oauth/token
OAUTH_PROVIDER_SCOPE=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAIswgYgGCSqGSIb3DQEHBqB7MHkCAQAwdAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwVKV0udS3ZnFeWub0CARCAR4WQcz6MEyY6OH/I5wFSLOysOo+emQH17QGX+KxPBLqarh7Wify+/LMkK3/FN6rRr3T2xB6byNZZP/jr22SBUwwVYWPkElTB
OAUTH_PROVIDER_SCOPE=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAGQwYgYJKoZIhvcNAQcGoFUwUwIBADBOBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDCRQqb2l+BYPc1DS2AIBEIAh8oKJ4Mud9oLA0TpqRuW21zUk39Xpty9tCq+vWAjSetSZ
OAUTH_CLIENT_ID=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAHUwcwYJKoZIhvcNAQcGoGYwZAIBADBfBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDDUvuxLvhPXkKehugQIBEIAyjngO1h1WzUhQzpymHqaLNFDNhVybhkk85W7wDabCljOhXkNo9aI309ieiCyfUBxKw+Q=
OAUTH_CLIENT_SECRET=AQECAHh7ea2tyZ6phZgT4B9BDKwguhlFtRC6hgt+7HbmeFsrsgAAAIcwgYQGCSqGSIb3DQEHBqB3MHUCAQAwcAYJKoZIhvcNAQcBMB4GCWCGSAFlAwQBLjARBAwEpP5g44PTnsAic8wCARCAQ0FLm3HddIKPj46o9BvvII2+8qyjVkEQ0hykKD4eTjvELTcNhV7kA9yJhE657pb8eASgEHOFnf17N36Ept5w+cRWxl8=
RECAP_CANCEL_REQUEST_SCHEMA_NAME=RecapCancelHoldRequest
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Cache from './src/cache/CacheFactory';
import CancelRequestConsumerError from './src/helpers/ErrorHelper';
import { postItemsToStream } from './src/helpers/StreamHelper';
import logger from './src/helpers/Logger';
import sendEmail from './src/helpers/EmailHelper';

const lambdaEnvVarsClient = new LambdaEnvVars();

Expand Down Expand Up @@ -46,6 +47,7 @@ exports.handleKinesisAsyncProcessing = async function (records, opts, context, c
const processedCheckedInItems = await ApiHelper.handleCancelItemPostRequests(processedCheckedOutItems, 'checkin-service', nyplCheckinRequestApiUrl, Cache.getToken());
logger.info(`posting to recap: ${nyplRecapRequestApiUrl}`)
const processedItemsToRecap = await ApiHelper.handleCancelItemPostRequests(processedCheckedInItems, 'recap-service', nyplRecapRequestApiUrl, Cache.getToken());
await sendEmail(processedItemsToRecap, Cache.getToken());

if (!processedItemsToRecap || !Array.isArray(processedItemsToRecap)) {
logger.error('The CancelRequestConsumer Lambda failed to process all Cancel Request Items', { processedItemsToRecap: processedItemsToRecap });
Expand Down

0 comments on commit bccf078

Please sign in to comment.