Refactor routes.py
This commit is contained in:
@@ -36,9 +36,15 @@ def create_app():
|
||||
return User.query.get(int(user_id)) # Query the User model by ID
|
||||
|
||||
# Register blueprints
|
||||
from app.routes import main, auth, user
|
||||
from app.routes.auth import auth
|
||||
from app.routes.data import data
|
||||
from app.routes.main import main
|
||||
from app.routes.user import user
|
||||
from app.routes.reading import reading
|
||||
app.register_blueprint(main, url_prefix='/')
|
||||
app.register_blueprint(auth, url_prefix='/auth')
|
||||
app.register_blueprint(user, url_prefix='/user')
|
||||
app.register_blueprint(data, url_prefix="/data")
|
||||
app.register_blueprint(reading, url_prefix="/reading")
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user