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 Pagination, Filtering and Sorting to endpoint Get Bounties for Phase #1669

Closed
5 tasks
fvalentiner opened this issue May 25, 2024 · 1 comment · Fixed by #1671
Closed
5 tasks

Add Pagination, Filtering and Sorting to endpoint Get Bounties for Phase #1669

fvalentiner opened this issue May 25, 2024 · 1 comment · Fixed by #1671
Assignees
Labels

Comments

@fvalentiner
Copy link
Contributor

fvalentiner commented May 25, 2024

Context

Bounty: https://community.sphinx.chat/bounty/2008

We need to add pagination, filtering and sorting to the get bounties for phase endpoint.
GET /features/{feature_uuid}/phase/{phase_uuid}/bounty

Design

Copy functionality from /gobounties/all
Make sure you handle all this query parameters
limit=10
&sortBy=created
&search=
&page=1
&resetPage=true
&Open=true
&Assigned=false
&Completed=false
&Paid=false
&languages=

The functionality to copy from the endpoint /gobounties/all is in the handler bountyHandler.GetAllBounties

  • Make sure you are running posgresql locally
  • Create file .env with the following content
    PORT=5005
    DATABASE_URL=postgres://postgres:asdf@localhost:5432/ebdb?sslmode=disable

Change DATABASE_URL to connect to your local DB (it could be an empty db)

  • Run "go run ." to run the backend API that connects to the DB and creates the objects

Your job is to create the routes, handler functions and db changes in order for the test to pass.

Acceptance Criteria

  • I have created bounties and put them on each of the bounty states [Open], [Assigned], [Completed], [Paid]
  • I have created bounties in different languages [Golang], [Typescript]
  • I have tested each of the query parameters [limit], [sortBy], [search], [page], [resetPage], [Open], [Assigned], [Completed], [Paid] and [languages
  • I have tested several values for each filter parameter
  • I can submit a pr within 6 hours of taking the bounty
@AbdulWahab3181
Copy link
Contributor

AbdulWahab3181 commented May 25, 2024

@fvalentiner Could you please assign me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: ✅ Done
2 participants