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

[API] provide mock api response for /snapshots #394

Closed
4 tasks
jeff-knurek opened this issue Jun 20, 2021 · 0 comments · Fixed by #412
Closed
4 tasks

[API] provide mock api response for /snapshots #394

jeff-knurek opened this issue Jun 20, 2021 · 0 comments · Fixed by #412
Assignees
Labels
Module: API Issues related to the API. Project: PLD Issue related to Project Lockdown. ⌨ Team: Devs Task related to Team Developers. 📑 Team: Docs Task related to Team Documentation.

Comments

@jeff-knurek
Copy link
Contributor

jeff-knurek commented Jun 20, 2021

logo

Problem

the frontend has already created a mock api response for the /snapshots endpoint: https://github.com/TheIOFoundation/ProjectLockdown/blob/master/MAP/public/data/snapshot.json

This data is for DSL_ID 1 with a date range from 2020-08-18 to 2020-08-24 & 2020-09-18 to 2020-09-24

Proposed solution

  • Create a controller for the API to respond to requests to /snapshots/{dsl id}/{DateStart}/{DateEnd}
  • if the api request is /snapshots/1/1597708800/1598227200 then the hardcoded mock data with August data and NOT September data should be returned
  • if the api request uses 2 as DSL id, then no data should be returned
  • if the api request is not GET, or for other parameters, the response should be an error state
@jeff-knurek jeff-knurek added Module: API Issues related to the API. Project: PLD Issue related to Project Lockdown. ⌨ Team: Devs Task related to Team Developers. 📑 Team: Docs Task related to Team Documentation. labels Jun 20, 2021
@StevenWuzz StevenWuzz linked a pull request Jul 19, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: API Issues related to the API. Project: PLD Issue related to Project Lockdown. ⌨ Team: Devs Task related to Team Developers. 📑 Team: Docs Task related to Team Documentation.
Development

Successfully merging a pull request may close this issue.

2 participants