Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Commit 9426ea9

Browse files
authored
Merge pull request #1277 from antsystem/fix/update-heart-beat-api
update api definition of /peer/heartbeat and /peer/network
2 parents 6681c18 + 702937c commit 9426ea9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

apis/swagger.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -649,15 +649,15 @@ paths:
649649
$ref: "#/responses/500ErrorResponse"
650650

651651
/peer/heartbeat:
652-
get:
652+
post:
653653
summary: "report the heart beat to super node."
654654
description: |
655655
This endpoint is mainly for reporting the heart beat to supernode.
656656
And supernode could know if peer is alive in strem mode.
657657
parameters:
658658
- name: "body"
659659
in: "body"
660-
description: "request body which contains peer info."
660+
description: "request body which contains base info of peer"
661661
schema:
662662
$ref: "#/definitions/HeartBeatRequest"
663663
responses:
@@ -669,7 +669,7 @@ paths:
669669
$ref: "#/responses/500ErrorResponse"
670670

671671
/peer/network:
672-
get:
672+
post:
673673
summary: "peer request the p2p network info from supernode."
674674
description: |
675675
In the new mode which dfdaemon will provide the seed file so that other peers
@@ -1488,11 +1488,11 @@ definitions:
14881488

14891489
HeartBeatRequest:
14901490
type: "object"
1491-
description: "The request is to report the heart beat to super node."
1491+
description: "The request is to report peer to supernode to keep alive."
14921492
properties:
14931493
IP:
14941494
type: "string"
1495-
description: "IP address which peer client carries."
1495+
description: "IP address which peer client carries"
14961496
format: "ipv4"
14971497
port:
14981498
type: "integer"

apis/types/heart_beat_request.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)