feat: Update curl template for index
All checks were successful
Build Docker / BuildImage (push) Successful in 53s

This commit is contained in:
2025-10-26 18:40:22 +11:00
parent abcaa9283d
commit 724e800201
5 changed files with 39 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
from flask import render_template
from tools import error_response, getAddress, get_tools_data
from tools import error_response, getAddress, get_tools_data, getClientIP
import os
from functools import lru_cache
import requests
@@ -81,7 +81,7 @@ def curl_response(request):
# Handle special cases
if path == "index":
# Get current project
return render_template("index.ascii",header=get_header(),repo=get_current_project()), 200, {'Content-Type': 'text/plain; charset=utf-8'}
return render_template("index.ascii",repo=get_current_project(), ip=getClientIP(request)), 200, {'Content-Type': 'text/plain; charset=utf-8'}
if path == "projects":
# Get projects
return render_template("projects.ascii",header=get_header(),projects=get_projects()), 200, {'Content-Type': 'text/plain; charset=utf-8'}