Files
LexiChain/lib/actions/stats.action.ts
2026-03-25 13:52:45 +01:00

15 lines
314 B
TypeScript

"use server";
import { auth } from "@clerk/nextjs/server";
import { getUserStats } from "@/lib/services/stats.service";
export async function getStatsAction() {
const { userId } = await auth();
if (!userId) {
return { success: false, error: "Unauthorized" };
}
return await getUserStats(userId);
}