Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Return open claims alongside bounties in API #437

Open
martinklepsch opened this issue Apr 25, 2018 · 0 comments
Open

Return open claims alongside bounties in API #437

martinklepsch opened this issue Apr 25, 2018 · 0 comments

Comments

@martinklepsch
Copy link
Contributor

Currently we send bounties and claims separately which led to issues like #432.

Similar to how claims are injected into owner-bounties (see code below) we should include claims with the API response. At the time of writing this "joining" is handled by a client side subscription.

(defn ^:private enrich-owner-bounties [owner-bounty]
(let [claims (map
#(update % :value_usd usd-decimal->str)
(bounties-db/bounty-claims (:issue_id owner-bounty)))
with-claims (assoc owner-bounty :claims claims)]
(-> with-claims
(update :value_usd usd-decimal->str)
(assoc :state (bounties/bounty-state with-claims)))))

Ultimately we will also need to implement server-side pagination as outlined in #250.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant