fix(admin): send bearer token for verification queue
Some checks failed
Build Admin And Update GitOps / build (push) Failing after 28s
Build Admin And Update GitOps / update-gitops (push) Has been skipped

This commit is contained in:
Ashwin Kumar Sivakumar 2026-07-05 18:10:12 +05:30
parent b7dfd070de
commit 7263befc1c

View file

@ -157,8 +157,14 @@ export default function VerificationManagementPage() {
const load = async () => {
try {
setError('');
const accessToken = typeof sessionStorage !== 'undefined'
? sessionStorage.getItem('nxtgauge_admin_access_token') || ''
: '';
const res = await fetch(`${API}/api/admin/verifications?page=1&limit=200`, {
headers: { Accept: 'application/json' },
headers: {
Accept: 'application/json',
...(accessToken ? { Authorization: `Bearer ${accessToken}` } : {}),
},
credentials: 'include',
});
if (!res.ok) throw new Error(`Failed to load verification queue (${res.status})`);