fixing rolodex and search

This commit is contained in:
HotSwapp
2025-08-11 21:58:25 -05:00
parent 278eb7c5d4
commit c76b68d009
25 changed files with 1651 additions and 915 deletions

View File

@@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - Delphi Consulting Group Database System</title>
<script src="/static/js/fetch-wrapper.js"></script>
<script src="/static/js/alerts.js"></script>
<!-- Tailwind CSS -->
<link href="/static/css/tailwind.css" rel="stylesheet">
@@ -96,7 +97,7 @@
try {
console.log('Sending request to /api/auth/login');
const response = await fetch('/api/auth/login', {
const response = await window.http.wrappedFetch('/api/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -154,11 +155,7 @@
async function checkTokenAndRedirect(token) {
try {
const response = await fetch('/api/auth/me', {
headers: {
'Authorization': `Bearer ${token}`
}
});
const response = await window.http.wrappedFetch('/api/auth/me');
if (response.ok) {
// Token is valid, redirect to customers page