ebanutsya

This commit is contained in:
2023-10-27 06:04:15 +03:00
parent 56792b892d
commit 1d2ee676ff
19 changed files with 196 additions and 13 deletions

12
routes/utils.py Normal file
View File

@@ -0,0 +1,12 @@
from functools import wraps
from flask import Blueprint
from flask_jwt_extended import verify_jwt_in_request
def jwt_protect_blueprint(blueprint) -> Blueprint:
@blueprint.before_request
def require_token():
verify_jwt_in_request()
return blueprint