Roadmap icon indicating copy to clipboard operation
Roadmap copied to clipboard

Add votes field to RoadmapFeature

Open mfcollins3 opened this issue 8 months ago • 0 comments

I added a votes field to the RoadmapFeature model type to allow the data source to return the current number of votes with the feature list download and not require separate API calls for each feature. I retained existing functionality by making the votes field optional and defaulting to the previous behavior if the field is not present in the JSON.

For background context, I created my own backend API for managing features for my application. I'm providing the API call as a URLRequest to the RoadmapConfiguration object. My API can retrieve all of the feature data including the current vote count for features and return them. This PR eliminates the need to have a separate service or API for managing vote counts. The FeatureVoter protocol is still being used to up-vote and down-vote features as I have separate REST APIs defined for that.

mfcollins3 avatar Jun 06 '24 05:06 mfcollins3