Skip to content

Commit

Permalink
fix: docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhrynenko committed Apr 22, 2024
1 parent 354c330 commit 3f7336c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/spec/components/schemas/Airdrop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ allOf:
required:
- address
- status
- amount
- tx_hash
- created_at
- updated_at
properties:
Expand All @@ -30,3 +32,11 @@ allOf:
format: time.Time
description: RFC3339 UTC timestamp of the airdrop successful tx
example: "2021-09-01T00:00:00Z"
amount:
type: string
description: Amount of airdropped coins
example: "100stake"
tx_hash:
type: string
description: Hash of the airdrop transaction
example: "F1CC0E80E151A67F75E41F2CDBF07920C29C9A3CDB6131B2A23A7C9D1964AD0B"
4 changes: 2 additions & 2 deletions docs/spec/paths/integrations@airdrop-svc@airdrops@{id}.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
get:
tags:
- Airdrop
summary: Create airdrop
description: Create an airdrop for unique user. The proof will be verified.
summary: Get an airdrop
description: Get an airdrop for unique user.
operationId: createAirdrop
parameters:
- in: path
Expand Down
2 changes: 2 additions & 0 deletions internal/service/handlers/get_airdrop.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ func toAirdropResponse(p data.Participant) resources.AirdropResponse {
Status: p.Status,
CreatedAt: p.CreatedAt,
UpdatedAt: p.UpdatedAt,
Amount: p.Amount,
TxHash: p.TxHash,
},
},
}
Expand Down
4 changes: 4 additions & 0 deletions resources/model_airdrop_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ import "time"
type AirdropAttributes struct {
// Destination address for the airdrop
Address string `json:"address"`
// Amount of airdropped coins
Amount string `json:"amount"`
// RFC3339 UTC timestamp of the airdrop creation
CreatedAt time.Time `json:"created_at"`
// Status of the airdrop transaction
Status string `json:"status"`
// Hash of the airdrop transaction
TxHash string `json:"tx_hash"`
// RFC3339 UTC timestamp of the airdrop successful tx
UpdatedAt time.Time `json:"updated_at"`
}

0 comments on commit 3f7336c

Please sign in to comment.