Create views_api.py
This commit is contained in:
parent
87cc8a484f
commit
3fb570c9fa
17
lnbits/extensions/example/views_api.py
Normal file
17
lnbits/extensions/example/views_api.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
#views_api.py is for you API endpoints that could be hit by another service
|
||||
|
||||
#add your dependencies here
|
||||
|
||||
from flask import jsonify, render_template, request, redirect, url_for
|
||||
from lnbits.db import open_db, open_ext_db
|
||||
from lnbits.extensions.example import example_ext
|
||||
|
||||
#add your endpoints here
|
||||
|
||||
@example_ext.route("/api/v1/example", methods=["GET","POST"])
|
||||
def api_example():
|
||||
"""Try to add descriptions for others."""
|
||||
#YOUR-CODE
|
||||
|
||||
return jsonify({"status": "TRUE"), 200
|
||||
|
Loading…
Reference in New Issue
Block a user