Skip to content

#167891607 Users should get stats of trips made in the last X timeframe#63

Open
Pomile wants to merge 1 commit intodevelopfrom
ft-get-tripsStatByTimeframe-endpoint-167891607
Open

#167891607 Users should get stats of trips made in the last X timeframe#63
Pomile wants to merge 1 commit intodevelopfrom
ft-get-tripsStatByTimeframe-endpoint-167891607

Conversation

@Pomile
Copy link
Copy Markdown
Collaborator

@Pomile Pomile commented Sep 12, 2019

What does this PR do?

Have a user get the counts of trips made within a period

Description of Task to be completed?

  • Write test
  • Validate timeframe(start and end date)
  • Modified seeders
  • Create a method that count trip request by time frame
  • Create a route handler
  • Write document with swagger

How should this be manually tested?

Unit test
  1. Clone the project repository
  2. Cd into the project repository
  3. Run git pull
  4. Run git checkout ft-get-tripsStatByTimeframe-endpoint-167891607`
  5. Run npm install
  6. Create database database_name
  7. Create .env file
  8. Run npm test
Development test with Postman
  1. Run npm run devstart
  2. Launch postman
  3. Create a new get request with /api/v1/trips/timeframe?start=2019-xx-xx&end='2019-xx-xx
  4. Add authorization(token) in the request header.
  5. Hit send

What are the relevant pivotal tracker stories?

#167891607

Any background context you want to add?

Nil

Screenshots

tripCount

@Pomile Pomile force-pushed the ft-get-tripsStatByTimeframe-endpoint-167891607 branch 3 times, most recently from f5e5d61 to f45cb90 Compare September 13, 2019 04:45
…t of

trips made in last x timeframe

- [x] Write test
- [x] Validate timeframe(start and end date)
- [x] Modified seeders
- [x] Create a method that count trip request by time frame
- [x] Create a route handler
- [x] Write document with swagger

[Finishes #167891607]
@Pomile Pomile force-pushed the ft-get-tripsStatByTimeframe-endpoint-167891607 branch from f45cb90 to d938129 Compare September 13, 2019 04:54
Copy link
Copy Markdown
Collaborator

@femitj femitj left a comment

Choose a reason for hiding this comment

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

Can you limit the trips to only completed ones

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants