Skip to content

Commit

Permalink
Respond to code review feedback
Browse files Browse the repository at this point in the history
- Only return one field from the query for now (the search phrase itself)
- Remove console logging on the success path, and simplify the error path message.

Eventually this will get refactored into something different, but we're deciding to stay with this path for the moment.
  • Loading branch information
matt-bernhardt committed May 21, 2024
1 parent d7fd436 commit 16e9e9c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/views/search/_trigger_tacos.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ $.ajax({
type: "POST",
url: "<%= ENV.fetch('TACOS_URL', '') %>",
contentType: 'application/json',
data: '{ "query": "{ logSearchEvent( searchTerm: \\"<%= params[:q] %>\\" sourceSystem: \\"bento\\" ) { phrase source } }" }',
data: '{ "query": "{ logSearchEvent( searchTerm: \\"<%= params[:q] %>\\" sourceSystem: \\"bento\\" ) { phrase } }" }',
dataType: 'json'
}).success(function (msg) {
console.log(msg.data.logSearchEvent);
}).fail(function (xhr, textStatus ) {
console.log('Failure looking up search in Tacos:');
console.log(xhr);
});

0 comments on commit 16e9e9c

Please sign in to comment.