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

Add new endpoint for fetching data from lists #39

Merged
merged 4 commits into from
Sep 19, 2023

Conversation

sweep-ai[bot]
Copy link

@sweep-ai sweep-ai bot commented Sep 19, 2023

Description

This PR adds a new endpoint to the Express router in the lib/index.js file. The new endpoint /lists/ allows clients to fetch data from lists based on the category and collection query parameters.

Summary of Changes

  • Added a new GET endpoint /lists/ to the Express router in lib/index.js
  • Implemented the callback function for the new endpoint
  • Checked for the presence of category and collection query parameters and returned an error response if they are missing
  • Called the gplay.list function with the category and collection query parameters
  • Mapped the results from gplay.list using the cleanUrls function
  • Converted the results to the standard format using the toList function
  • Sent the results back to the client using res.json.bind(res)
  • Added error handling for the promise chain using the .catch function

Please review and merge this PR. Thank you!

Fixes #37.


🎉 Latest improvements to Sweep:


💡 To get Sweep to edit this pull request, you can:

  • Leave a comment below to get Sweep to edit the entire PR
  • Leave a comment in the code will only modify the file
  • Edit the original issue to get Sweep to recreate the PR from scratch

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Sep 19, 2023
@sweep-ai sweep-ai bot mentioned this pull request Sep 19, 2023
1 task
@github-actions github-actions bot temporarily deployed to Fly September 19, 2023 11:38 Destroyed
@github-actions github-actions bot temporarily deployed to FlyDev September 19, 2023 12:10 Destroyed
@github-actions github-actions bot temporarily deployed to FlyDev September 19, 2023 12:10 Destroyed
@sweep-ai
Copy link
Author

sweep-ai bot commented Sep 19, 2023

GitHub actions yielded the following error.

The command that failed is flyctl deploy. Here are the relevant lines from the logs:

�[33mWARN�[0m failed to acquire lease: failed to get lease on VM 5683d611b737e8: machine ID 5683d611b737e8 lease currently held by signup-fly@cashlessconsumer.in, expires at 2023-09-19T12:11:06Z
Error: error acquiring leases on all machines
##[error]Process completed with exit code 1.

This is likely a linting or type-checking issue with the source code. Update the code changed by the PR. Don't modify the existing tests.

I'm getting the same errors 3 times in a row, so I will stop working on fixing this PR.

@github-actions github-actions bot temporarily deployed to FlyDev September 19, 2023 12:41 Destroyed
@github-actions github-actions bot temporarily deployed to FlyDev September 19, 2023 22:43 Destroyed
@srikanthlogic srikanthlogic merged commit 6af0093 into main Sep 19, 2023
4 checks passed
@srikanthlogic srikanthlogic deleted the sweep/add-lists-endpoint branch September 20, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep (slow):
1 participant