Fix 401 error with plugs
This commit is contained in:
parent
0d75cb5913
commit
3f178f8795
1 changed files with 1 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ export async function POST(
|
||||||
|
|
||||||
const res = await fetch(`http://localhost:3001/power/${device}/${action}`, {
|
const res = await fetch(`http://localhost:3001/power/${device}/${action}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
|
headers: { Authorization: `Bearer ${token}` },
|
||||||
});
|
});
|
||||||
|
|
||||||
return new NextResponse(null, { status: res.status });
|
return new NextResponse(null, { status: res.status });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue