mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
document + rename stuff
This commit is contained in:
+1
-4
@@ -76,6 +76,7 @@ def create_api():
|
||||
CORS(app, origins="*", supports_credentials=True)
|
||||
|
||||
# RESPONSE COMPRESSION
|
||||
# Only compress JSON responses
|
||||
Compress(app)
|
||||
app.config["COMPRESS_MIMETYPES"] = [
|
||||
"application/json",
|
||||
@@ -84,10 +85,6 @@ def create_api():
|
||||
# JWT
|
||||
jwt = JWTManager(app)
|
||||
|
||||
# @jwt.user_identity_loader
|
||||
# def user_identity_lookup(user):
|
||||
# return user
|
||||
|
||||
@jwt.user_lookup_loader
|
||||
def user_lookup_callback(_jwt_header, jwt_data):
|
||||
identity = jwt_data["sub"]
|
||||
|
||||
Reference in New Issue
Block a user