|
|
@ -11,6 +11,7 @@ import uuid |
|
|
|
from datetime import datetime |
|
|
|
from datetime import datetime |
|
|
|
from constants import UserRole |
|
|
|
from constants import UserRole |
|
|
|
from utils.utils import random_string_generator, hash_string |
|
|
|
from utils.utils import random_string_generator, hash_string |
|
|
|
|
|
|
|
from flask_cors import CORS |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from blueprints.profile import profile as profileBlueprint |
|
|
|
from blueprints.profile import profile as profileBlueprint |
|
|
@ -18,6 +19,13 @@ from blueprints.session import session as sessionBlueprint |
|
|
|
from blueprints.admin import admin as adminBlueprint |
|
|
|
from blueprints.admin import admin as adminBlueprint |
|
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__) |
|
|
|
app = Flask(__name__) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Enable CORS for all routes |
|
|
|
|
|
|
|
CORS(app) |
|
|
|
|
|
|
|
# Enable CORS for specific routes |
|
|
|
|
|
|
|
# CORS(app, resources={ |
|
|
|
|
|
|
|
# r"/api/*": {"origins": "*"} # Allows CORS for all `/api/` routes |
|
|
|
|
|
|
|
# }) |
|
|
|
# Set configuration directly on the app instance |
|
|
|
# Set configuration directly on the app instance |
|
|
|
app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'gif'} |
|
|
|
app.config['ALLOWED_EXTENSIONS'] = {'png', 'jpg', 'jpeg', 'gif'} |
|
|
|
|
|
|
|
|
|
|
|