Skip to content

Commit 19ce495

Browse files
committed
Fix name of "TargetAmount" property of a donation. The correct name is just amount
1 parent 52e55e9 commit 19ce495

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

internal/mock_api/endpoints/charity/donations.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ var donationsScopesByMethod = map[string][]string{
3434
type CharityDonations struct{}
3535

3636
type GetCharityDonationsResponse struct {
37-
ID string `json:"id"`
38-
CampaignID string `json:"campaign_id"`
39-
UserID string `json:"user_id"`
40-
UserLogin string `json:"user_login"`
41-
UserName string `json:"user_name"`
42-
TargetAmount CharityAmount `json:"amount"`
37+
ID string `json:"id"`
38+
CampaignID string `json:"campaign_id"`
39+
UserID string `json:"user_id"`
40+
UserLogin string `json:"user_login"`
41+
UserName string `json:"user_name"`
42+
Amount CharityAmount `json:"amount"`
4343
}
4444

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

0 commit comments

Comments
 (0)