From 3f178f879548bd00994df867eb2943b5c1262e0d Mon Sep 17 00:00:00 2001 From: Jack Mechem Date: Thu, 21 May 2026 19:33:44 -0700 Subject: [PATCH] Fix 401 error with plugs --- app/api/power/[device]/[action]/route.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/api/power/[device]/[action]/route.ts b/app/api/power/[device]/[action]/route.ts index bfd2e75..a98a953 100644 --- a/app/api/power/[device]/[action]/route.ts +++ b/app/api/power/[device]/[action]/route.ts @@ -19,6 +19,7 @@ export async function POST( const res = await fetch(`http://localhost:3001/power/${device}/${action}`, { method: "POST", + headers: { Authorization: `Bearer ${token}` }, }); return new NextResponse(null, { status: res.status });