fix(auth): pass request.headers to getCurrentUser in all protected routes

dashboard, diagnoses, expert routes now support Authorization header fallback for Android WebView

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
MythEclipse
2026-06-15 20:11:11 +07:00
co-authored by Claude
parent 7693a02c98
commit c881e6a2b2
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ export const dashboardRoutes = new Elysia({ prefix: '/api/v1' })
.get('/dashboard/summary', async ({ request }) => {
try {
const db = createDbClient();
const user = await getCurrentUser(request.headers.get('cookie'));
const user = await getCurrentUser(request.headers.get('cookie'), request.headers);
const diseases = await db.select().from(diseaseCatalog).orderBy(diseaseCatalog.displayOrder);
const manualRows = await db.select().from(manualClassifications).orderBy(desc(manualClassifications.createdAt)).limit(1);