stakwork / sphinx-tribes

Backend for sphinx tribes and bounties. The bounty platform pays out in bitcoin. Sign up with Sphinx Chat, complete a bounty, and earn bitcoin! Go to our website for available bounties.
https://community.sphinx.chat/bounties
33 stars 60 forks source link

Create route /features/uuid/phase/uuid/tickets #1982

Open humansinstitute opened 6 days ago

humansinstitute commented 6 days ago

This endpoint will be used to return the full list of ticket UUIDS for a given feature and phase uuid.

Add a route to features.go at /features/uuid/phase/uuid/tickets

    r.Get("/{uuid}/phase/{uuid}/tickets", featureHandlers.GetTickets)

Context

We need to create a new endpoint that returns all ticket UUIDs associated with a specific feature and phase. This endpoint will be used to fetch the complete list of tickets for a given phase within a feature.

Task

Add a new route to features.go that handles GET requests for retrieving all tickets associated with a feature and phase UUID combination.

Outcome

A functioning route that accepts feature UUID and phase UUID parameters and returns the associated ticket UUIDs.

Design

Route Definition

In features.go:

func RegisterFeatureRoutes(r chi.Router) {
    // Existing routes...

    // New route for getting phase tickets
    r.Get("/{featureUUID}/phase/{phaseUUID}/tickets", featureHandlers.GetTickets)
}

Acceptance Criteria

MuhammadUmer44 commented 6 days ago

@humansinstitute, Please assign me?