Skip to content

Commit

Permalink
Fix name of "TargetAmount" property of a donation. The correct name i…
Browse files Browse the repository at this point in the history
…s just amount
  • Loading branch information
aaricdev committed Dec 4, 2023
1 parent 52e55e9 commit 19ce495
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/mock_api/endpoints/charity/donations.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ var donationsScopesByMethod = map[string][]string{
type CharityDonations struct{}

type GetCharityDonationsResponse struct {
ID string `json:"id"`
CampaignID string `json:"campaign_id"`
UserID string `json:"user_id"`
UserLogin string `json:"user_login"`
UserName string `json:"user_name"`
TargetAmount CharityAmount `json:"amount"`
ID string `json:"id"`
CampaignID string `json:"campaign_id"`
UserID string `json:"user_id"`
UserLogin string `json:"user_login"`
UserName string `json:"user_name"`
Amount CharityAmount `json:"amount"`
}

func (e CharityDonations) Path() string { return "/charity/donations" }
Expand Down Expand Up @@ -104,7 +104,7 @@ func getCharityDonations(w http.ResponseWriter, r *http.Request) {
UserID: userCtx.UserID,
UserName: user.DisplayName,
UserLogin: user.UserLogin,
TargetAmount: CharityAmount{
Amount: CharityAmount{
Value: rand.Intn(150000-300) + 300, // Between $3 and $1,500
DecimalPlaces: 2,
Currency: "USD",
Expand Down

0 comments on commit 19ce495

Please sign in to comment.