Skip to content

Commit

Permalink
feat: Add custom headers to extract user role & email
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Sep 19, 2024
1 parent a6213ee commit 3b078d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/api/admin/dashboard/tiles/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { Hospital, Patient, Doctor, Receptionist } from "@models/index";

export async function GET(request: Request) {
try {
const role = request.headers.get("x-user-role");
const email = request.headers.get("x-user-email");

await dbConfig();

// start of the current month and the previous month
Expand Down

0 comments on commit 3b078d8

Please sign in to comment.