Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endpoint consolidation #606

Merged
merged 7 commits into from
May 15, 2020
Merged

endpoint consolidation #606

merged 7 commits into from
May 15, 2020

Conversation

jmensch1
Copy link
Contributor

@jmensch1 jmensch1 commented May 13, 2020

Fixes #605 and #511

This changes some of our endpoints to limit database calls and make the api cleaner. The PR looks like a lot of changes, but it's mostly just reorganizing code that was already there.

Visualizations endpoints

We've been hitting three separate visualizations endpoints every time the user clicks "Submit": /requestfrequency, /requestcounts, and /timetoclose. This consolidates them into a single /visualizations endpoint that makes a single request to the database (instead of 3 separate DB calls that ask for a lot of the same data).

Comparison endpoints

We still have three comparison endpoints, since the frontend calls them individually. But this puts them in a single ComparisonService, with new signatures for the endpoints:

/comparison/frequency
/comparison/timetoclose
/comparison/counts

There's a small amount of frontend code here to integrate the new endpoints. I also removed the /pins endpoint and service since we're not using it any more.

  • Up to date with dev branch
  • Branch name follows guidelines
  • All PR Status checks are successful
  • Peer reviewed and approved

Any questions? See the getting started guide

@jmensch1 jmensch1 requested review from sellnat77 and adamkendis May 13, 2020 01:12
@jmensch1 jmensch1 linked an issue May 13, 2020 that may be closed by this pull request
Copy link
Member

@adamkendis adamkendis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Front-end changes look good. I looked through the back-end changes but not in great detail.

@jmensch1 jmensch1 merged commit 033c14c into dev May 15, 2020
@jmensch1 jmensch1 deleted the 605-BACK-EndpointConsolidation branch May 15, 2020 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consolidate visualization and comparison endpoints Change paths for comparison routes
2 participants