Skip to content

Commit

Permalink
Merge pull request #104 from swapper-pegasus/98-create-status-endpoint
Browse files Browse the repository at this point in the history
Status endpoint
  • Loading branch information
phoenix-web3 authored Feb 25, 2022
2 parents 479e2b3 + f111600 commit 1c3b5b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Connector/info/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/python

GET_VERSION_METHOD = "getVersion"
GET_STATUS = "getStatus"
14 changes: 14 additions & 0 deletions Connector/info/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ async def getVersion(request):
)
)


@routes.get(f"/{GET_STATUS}")
async def getStatus(request):

logger.printInfo("Executing getStatus method")

return web.Response(
text=json.dumps(
{
"status": "Connector is running"
}
)
)

infoModule = web.Application()
infoModule.add_routes(routes)

Expand Down

0 comments on commit 1c3b5b4

Please sign in to comment.