lnbits-legend/lnbits/extensions/example/views_api.py

14 lines
311 B
Python
Raw Normal View History

# views_api.py is for you API endpoints that could be hit by another service
# add your dependencies here
from . import example_ext
# add your endpoints here
2023-01-06 15:28:32 +00:00
2023-01-06 14:28:43 +00:00
@example_ext.get("/api/v1/test/{test_data}")
async def api_example(test_data):
# Do some python things and return the data
return test_data