Rebrand from Casera/MyCrib to honeyDue
Total rebrand across Web project: - Package name: casera-web -> honeydue-web - Cookie: casera-token -> honeydue-token - Theme store: casera-theme -> honeydue-theme - File sharing: .casera -> .honeydue, component/function renames - casera-file-handler.tsx -> honeydue-file-handler.tsx - All UI text, metadata, OG tags updated - Domains: casera.treytartt.com -> honeyDue.treytartt.com - Demo data emails updated - All documentation updated Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
// ---------------------------------------------------------------------------
|
||||
// Base API client for Casera web app
|
||||
// Base API client for honeyDue web app
|
||||
// ---------------------------------------------------------------------------
|
||||
// All client-side requests go through Next.js API route handlers (proxy).
|
||||
// The proxy reads the httpOnly `casera-token` cookie and forwards it to the
|
||||
// The proxy reads the httpOnly `honeydue-token` cookie and forwards it to the
|
||||
// Go API as an Authorization header. This avoids exposing the token to JS.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const API_BASE_URL =
|
||||
process.env.NEXT_PUBLIC_API_URL || 'https://casera.treytartt.com/api';
|
||||
process.env.NEXT_PUBLIC_API_URL || 'https://honeyDue.treytartt.com/api';
|
||||
|
||||
/**
|
||||
* Server-only base URL. Falls back to the public one so that server
|
||||
@@ -86,7 +86,7 @@ export async function apiFetch<T>(
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Server-side fetch that reads the auth token from the `casera-token` cookie
|
||||
* Server-side fetch that reads the auth token from the `honeydue-token` cookie
|
||||
* and calls the Go API directly (no proxy hop).
|
||||
*
|
||||
* Only use this inside:
|
||||
@@ -102,7 +102,7 @@ export async function serverFetch<T>(
|
||||
// (the function itself should only be *called* on the server).
|
||||
const { cookies } = await import('next/headers');
|
||||
const cookieStore = await cookies();
|
||||
const token = cookieStore.get('casera-token')?.value;
|
||||
const token = cookieStore.get('honeydue-token')?.value;
|
||||
|
||||
const normalized = path.endsWith('/') ? path : `${path}/`;
|
||||
const url = `${SERVER_API_URL}${normalized}`;
|
||||
|
||||
Reference in New Issue
Block a user