First revision
This commit is contained in:
@@ -84,7 +84,7 @@ def create_app(config_name='default') -> Flask:
|
||||
from .urls import bp as urls_bp
|
||||
|
||||
# Register with potentially more specific prefixes
|
||||
app.register_blueprint(auth_bp, url_prefix='/api/auth')
|
||||
app.register_blueprint(auth_bp, url_prefix='/api')
|
||||
app.register_blueprint(ai_services_bp, url_prefix="/api/ai") # Changed prefix
|
||||
app.register_blueprint(activity_bp, url_prefix='/api/activity')
|
||||
app.register_blueprint(projects_bp, url_prefix='/api/projects')
|
||||
|
||||
@@ -4,8 +4,8 @@ from flask import Blueprint
|
||||
|
||||
# Define the Blueprint instance for the authentication module.
|
||||
# 'auth' is the unique name for this blueprint.
|
||||
# url_prefix='/api/auth' will be prepended to all routes defined in this blueprint.
|
||||
bp = Blueprint('auth', __name__, url_prefix='/api/auth')
|
||||
# url_prefix='/api' so routes like '/register' become '/api/register'
|
||||
bp = Blueprint('auth', __name__, url_prefix='/api')
|
||||
|
||||
# Import the routes module.
|
||||
# This connects the routes defined in routes.py to the 'bp' instance.
|
||||
|
||||
@@ -5,11 +5,7 @@ import secrets
|
||||
|
||||
class Config:
|
||||
# MongoDB Atlas connection string: set it in your environment variables
|
||||
MONGO_URI: str = os.environ.get(
|
||||
"MONGO_URI",
|
||||
"mongodb+srv://surfsmart_server:IVV0mzUcwoEqHjNV@projectdatacluster.ki0t3z8.mongodb.net/surfsmart?retryWrites=true&w=majority&appName=ProjectDataCluster"
|
||||
)
|
||||
|
||||
MONGO_URI: str = os.environ.get("MONGO_URI", "mongodb://localhost:27017/surfsmart")
|
||||
# Flask secret key for sessions and JWT (use a secure value in production)
|
||||
SECRET_KEY: str = os.environ.get("SECRET_KEY", secrets.token_hex(32))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user