mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-12-05 06:10:01 -05:00
add api to fetch reticulum interfaces
This commit is contained in:
parent
791eb1db58
commit
7085683c66
1 changed files with 12 additions and 0 deletions
12
web.py
12
web.py
|
|
@ -154,6 +154,18 @@ class ReticulumWebChat:
|
|||
"comports": comports,
|
||||
})
|
||||
|
||||
# fetch reticulum interfaces
|
||||
@routes.get("/api/v1/reticulum/interfaces")
|
||||
async def index(request):
|
||||
|
||||
interfaces = {}
|
||||
if "interfaces" in self.reticulum.config:
|
||||
interfaces = self.reticulum.config["interfaces"]
|
||||
|
||||
return web.json_response({
|
||||
"interfaces": interfaces,
|
||||
})
|
||||
|
||||
# handle websocket clients
|
||||
@routes.get("/ws")
|
||||
async def ws(request):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue