Skip to content

Commit 87d80e3

Browse files
committed
Fixed some example stuff
1 parent 279aa99 commit 87d80e3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

references/nextjs-realtime/src/app/actions.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export async function triggerExampleTask() {
1414
console.log("Setting the run JWT in a cookie", handle.publicAccessToken);
1515

1616
// Set JWT in a secure, HTTP-only cookie
17-
cookies().set("run_jwt", handle.publicAccessToken);
17+
cookies().set("run_token", handle.publicAccessToken);
1818

1919
// Redirect to the details page
2020
redirect(`/runs/${handle.id}`);
@@ -34,10 +34,10 @@ export async function batchTriggerExampleTask() {
3434
{ payload: { id: randomUUID() } },
3535
]);
3636

37-
console.log("Setting the run JWT in a cookie", handle.jwt);
37+
console.log("Setting the run JWT in a cookie", handle.publicAccessToken);
3838

3939
// Set JWT in a secure, HTTP-only cookie
40-
cookies().set("run_jwt", handle.jwt);
40+
cookies().set("run_token", handle.publicAccessToken);
4141

4242
// Redirect to the details page
4343
redirect(`/batches/${handle.batchId}`);

references/nextjs-realtime/src/app/batches/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ClientBatchRunDetails from "./ClientBatchRunDetails";
44

55
export default async function DetailsPage({ params }: { params: { id: string } }) {
66
const cookieStore = cookies();
7-
const jwt = cookieStore.get("run_jwt");
7+
const jwt = cookieStore.get("run_token");
88

99
if (!jwt) {
1010
notFound();

references/nextjs-realtime/src/app/runs/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ClientRunDetails from "./ClientRunDetails";
44

55
export default async function DetailsPage({ params }: { params: { id: string } }) {
66
const cookieStore = cookies();
7-
const jwt = cookieStore.get("run_jwt");
7+
const jwt = cookieStore.get("run_token");
88

99
if (!jwt) {
1010
notFound();

0 commit comments

Comments
 (0)