Skip to content

Commit 5fd7560

Browse files
committed
fix: api docs
1 parent 5ce691f commit 5fd7560

File tree

1 file changed

+40
-32
lines changed

1 file changed

+40
-32
lines changed

hathor/healthcheck/resources/healthcheck.py

+40-32
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,16 @@ def render_GET(self, request):
9090
'value': {
9191
'status': 'pass',
9292
'description': 'Hathor-core v0.56.0',
93-
'components': [
94-
{
95-
'componentName': 'sync',
96-
'componentType': 'internal',
97-
'status': 'pass',
98-
'output': 'Healthy'
99-
}
100-
]
93+
'checks': {
94+
'sync': [
95+
{
96+
'componentName': 'sync',
97+
'componentType': 'internal',
98+
'status': 'pass',
99+
'output': 'Healthy'
100+
}
101+
]
102+
}
101103
}
102104
}
103105
}
@@ -114,44 +116,50 @@ def render_GET(self, request):
114116
'value': {
115117
'status': 'fail',
116118
'description': 'Hathor-core v0.56.0',
117-
'components': [
118-
{
119-
'componentName': 'sync',
120-
'componentType': 'internal',
121-
'status': 'fail',
122-
'output': 'Node doesn\'t have recent blocks'
123-
}
124-
]
119+
'checks': {
120+
'sync': [
121+
{
122+
'componentName': 'sync',
123+
'componentType': 'internal',
124+
'status': 'fail',
125+
'output': 'Node doesn\'t have recent blocks'
126+
}
127+
]
128+
}
125129
}
126130
},
127131
'no_synced_peer': {
128132
'summary': 'Node with no synced peer',
129133
'value': {
130134
'status': 'fail',
131135
'description': 'Hathor-core v0.56.0',
132-
'components': [
133-
{
134-
'componentName': 'sync',
135-
'componentType': 'internal',
136-
'status': 'fail',
137-
'output': 'Node doesn\'t have a synced peer'
138-
}
139-
]
136+
'checks': {
137+
'sync': [
138+
{
139+
'componentName': 'sync',
140+
'componentType': 'internal',
141+
'status': 'fail',
142+
'output': 'Node doesn\'t have a synced peer'
143+
}
144+
]
145+
}
140146
}
141147
},
142148
'peer_best_block_far_ahead': {
143149
'summary': 'Peer with best block too far ahead',
144150
'value': {
145151
'status': 'fail',
146152
'description': 'Hathor-core v0.56.0',
147-
'components': [
148-
{
149-
'componentName': 'sync',
150-
'componentType': 'internal',
151-
'status': 'fail',
152-
'output': 'Node\'s peer with highest height is too far ahead.'
153-
}
154-
]
153+
'checks': {
154+
'sync': [
155+
{
156+
'componentName': 'sync',
157+
'componentType': 'internal',
158+
'status': 'fail',
159+
'output': 'Node\'s peer with highest height is too far ahead.'
160+
}
161+
]
162+
}
155163
}
156164
}
157165
}

0 commit comments

Comments
 (0)