chore: use standard library's HTTP status codes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from flask import g, abort, render_template
|
||||
from http import HTTPStatus
|
||||
|
||||
from lnbits.decorators import check_user_exists, validate_uuids
|
||||
from lnbits.helpers import Status
|
||||
|
||||
from lnbits.extensions.tpos import tpos_ext
|
||||
from .crud import get_tpos
|
||||
@@ -16,6 +16,6 @@ def index():
|
||||
|
||||
@tpos_ext.route("/<tpos_id>")
|
||||
def tpos(tpos_id):
|
||||
tpos = get_tpos(tpos_id) or abort(Status.NOT_FOUND, "TPoS does not exist.")
|
||||
tpos = get_tpos(tpos_id) or abort(HTTPStatus.NOT_FOUND, "TPoS does not exist.")
|
||||
|
||||
return render_template("tpos/tpos.html", tpos=tpos)
|
||||
|
||||
Reference in New Issue
Block a user