feat(market): add Minha Intenções tab with panel, hook, and badge
- Introduced "Minhas Intenções" tab visible only to logged-in users. - Integrated MyPurchaseIntentionsPanel and useMyPurchaseIntentions hook. - Added tab badge showing count of pending intentions. - Extended session API to include user’s main character for downstream features.
This commit is contained in:
1 parent
f35fee944d
commit
7f42def478
55 files changed
+4906
-95
No files matched your search
@@ -3,6 +3,7 @@ import { cookies } from "next/headers";
|
||||
import { secureLogger } from "@/lib/secure-logger";
|
||||
import { getSession, refreshSession, deleteSession } from "@/lib/redis/session";
|
||||
import { verifyAccessToken } from "@/lib/auth/jwt";
|
||||
import { getMainCharacter } from "@/lib/prisma/queries/characters";
|
||||
|
||||
/**
|
||||
* GET /api/auth/session
|
||||
@@ -65,6 +66,9 @@ export async function GET(request: NextRequest) {
|
||||
// Atualizar TTL da sessão
|
||||
await refreshSession(sessionId);
|
||||
|
||||
// Buscar personagem principal do usuário
|
||||
const mainCharacter = await getMainCharacter(session.userId);
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
success: true,
|
||||
@@ -73,6 +77,7 @@ export async function GET(request: NextRequest) {
|
||||
userId: session.userId,
|
||||
username: session.username,
|
||||
email: session.email,
|
||||
characterName: mainCharacter?.character_name || null,
|
||||
},
|
||||
},
|
||||
{ status: 200 }
|
||||
|
||||
Reference in new issue
Block a user