Files

15 lines
314 B
TypeScript
Raw Permalink Normal View History

2026-03-25 13:52:45 +01:00
"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);
}