Fix admin dashboard and update repository URLs
- Fix _api_get to handle query strings in URL path - Replace placeholder github.com/your-org URLs with gitea.brrd.tech/rob Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
50326a11c6
commit
a4ed9ed730
|
|
@ -18,7 +18,14 @@ def _api_get(path: str, params: Optional[Dict[str, Any]] = None, token: Optional
|
||||||
headers = {}
|
headers = {}
|
||||||
if token:
|
if token:
|
||||||
headers["Authorization"] = f"Bearer {token}"
|
headers["Authorization"] = f"Bearer {token}"
|
||||||
response = client.get(path, query_string=params or {}, headers=headers)
|
# Parse query string from path if present
|
||||||
|
from urllib.parse import urlparse, parse_qs
|
||||||
|
parsed = urlparse(path)
|
||||||
|
actual_path = parsed.path
|
||||||
|
query_params = {k: v[0] for k, v in parse_qs(parsed.query).items()}
|
||||||
|
if params:
|
||||||
|
query_params.update(params)
|
||||||
|
response = client.get(actual_path, query_string=query_params, headers=headers)
|
||||||
return response.status_code, response.get_json(silent=True) or {}
|
return response.status_code, response.get_json(silent=True) or {}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-3 text-base font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700">
|
class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-3 text-base font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700">
|
||||||
Go Home
|
Go Home
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/your-org/cmdforge/issues"
|
<a href="https://gitea.brrd.tech/rob/CmdForge/issues"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-3 text-base font-medium text-gray-700 border border-gray-300 rounded-md hover:bg-gray-50">
|
class="w-full sm:w-auto inline-flex justify-center items-center px-6 py-3 text-base font-medium text-gray-700 border border-gray-300 rounded-md hover:bg-gray-50">
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@
|
||||||
<p class="text-lg text-gray-600 mb-8">
|
<p class="text-lg text-gray-600 mb-8">
|
||||||
CmdForge is open source and welcomes contributions of all kinds.
|
CmdForge is open source and welcomes contributions of all kinds.
|
||||||
</p>
|
</p>
|
||||||
<a href="https://github.com/your-org/cmdforge"
|
<a href="https://gitea.brrd.tech/rob/CmdForge"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="inline-flex items-center px-6 py-3 text-base font-medium text-white bg-gray-900 rounded-md hover:bg-gray-800">
|
class="inline-flex items-center px-6 py-3 text-base font-medium text-white bg-gray-900 rounded-md hover:bg-gray-800">
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@
|
||||||
|
|
||||||
<!-- Edit on GitHub -->
|
<!-- Edit on GitHub -->
|
||||||
<div class="mt-6 text-center">
|
<div class="mt-6 text-center">
|
||||||
<a href="https://github.com/your-org/cmdforge/edit/main/docs/{{ current_path }}.md"
|
<a href="https://gitea.brrd.tech/rob/CmdForge/edit/main/docs/{{ current_path }}.md"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
class="inline-flex items-center text-sm text-gray-500 hover:text-gray-700">
|
class="inline-flex items-center text-sm text-gray-500 hover:text-gray-700">
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Email: privacy@cmdforge.dev</li>
|
<li>Email: privacy@cmdforge.dev</li>
|
||||||
<li>GitHub: <a href="https://github.com/your-org/cmdforge/issues">Open an issue</a></li>
|
<li>GitHub: <a href="https://gitea.brrd.tech/rob/CmdForge/issues">Open an issue</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Email: legal@cmdforge.dev</li>
|
<li>Email: legal@cmdforge.dev</li>
|
||||||
<li>GitHub: <a href="https://github.com/your-org/cmdforge/issues">Open an issue</a></li>
|
<li>GitHub: <a href="https://gitea.brrd.tech/rob/CmdForge/issues">Open an issue</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue