Skip to content

Commit 6540631

Browse files
Merge pull request #252 from MITLibraries/integration-again
Update lambda response handling
2 parents fa235c7 + 23e91d6 commit 6540631

File tree

5 files changed

+23
-23
lines changed

5 files changed

+23
-23
lines changed

app/models/detector/ml_citation.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def fetch(phrase)
140140
response = lambda.post(self.class.lambda_path, payload.to_json)
141141

142142
if response.status == 200
143-
JSON.parse(response.body)['response'] == 'True'
143+
JSON.parse(response.body)['response'] == true
144144
else
145145
Rails.logger.error(response.body)
146146
Sentry.set_extras({ body: response.body })

test/vcr_cassettes/lambda_citation.yml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/vcr_cassettes/lambda_citation_sequence.yml

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/vcr_cassettes/lambda_no_citation.yml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/vcr_cassettes/lambda_with_wrong_secret.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)