Skip to content

Commit 6949bae

Browse files
committed
Fix guest interview access + jobs.html worker URL
1 parent 1c21430 commit 6949bae

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

interview/proctored-room.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,15 @@ <h1>Simpatico<span>HR</span></h1>
425425
const urlParams = new URLSearchParams(window.location.search);
426426
const roomId = urlParams.get('room');
427427

428-
if (!token || !user.id) { alert('Please login first'); window.location.href='../auth/login.html'; }
428+
const interviewId = urlParams.get('interview_id');
429+
const magicToken = urlParams.get('token');
430+
if (!token && magicToken && interviewId) {
431+
token = magicToken;
432+
user = { id: 'guest_' + interviewId, role: 'candidate', is_guest: true };
433+
} else if (!token || !user.id) {
434+
alert('Invalid interview link. Please check your invitation.');
435+
window.location.href = '../auth/login.html';
436+
}
429437

430438
// ═══════════════════════════════════════════════════════
431439
// STATE

jobs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ <h3>🗑️ Delete Job</h3>
244244
// ═══════════════════════════════════════════════════════════════
245245
// CONFIG — NO EXPOSED CREDENTIALS
246246
// ═══════════════════════════════════════════════════════════════
247-
const WORKER_URL = (localStorage.getItem('workerUrl') || "https://solitary-sound-11b9.simpaticohrconsultancy.workers.dev").replace(/\/$/, '');
247+
const WORKER_URL = "https://api.simpaticohr.in";
248248

249249
let allJobs = [];
250250
let currentFilter = 'all';

0 commit comments

Comments
 (0)