Further refactor, still need to cleanup db.py

This commit is contained in:
Peter Stockings
2025-07-21 23:25:25 +10:00
parent 2ec44252bb
commit f55f50d0dc
11 changed files with 130 additions and 389 deletions

8
app.py
View File

@@ -38,7 +38,7 @@ init_app(app)
app.register_blueprint(timer, url_prefix='/timer')
app.register_blueprint(test, url_prefix='/test')
app.register_blueprint(home, url_prefix='/home')
app.register_blueprint(http, url_prefix='/dashboard/http_functions')
app.register_blueprint(http, url_prefix='/http')
class User(UserMixin):
def __init__(self, id, username, password_hash, created_at):
@@ -123,11 +123,7 @@ def documentation():
@ app.route("/dashboard", methods=["GET"])
@login_required
def dashboard():
user_id = current_user.id
http_functions = db.get_http_functions_for_user(user_id)
http_functions = create_http_functions_view_model(http_functions)
return render_template("dashboard/http_functions/overview.html", http_functions=http_functions)
return redirect(url_for("home.index"))
def _generate_script_from_natural_language(natural_query):
"""Generates a Javascript function from natural language using Gemini REST API."""