Files
MineGeo/lib/profile-cosmetics.ts
pavel444-byte c541cc09b4
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 7m10s
Add public profiles and cosmetic shop
2026-10-15 17:30:10 +05:00

16 lines
412 B
TypeScript

import "server-only";
import { admin, required } from "./supabase";
import {
cosmeticShopStateSchema,
type CosmeticShopState,
} from "@/shared/profile-cosmetics";
export async function profileCosmeticsState(
userId: string,
): Promise<CosmeticShopState> {
const result = required(
await admin().rpc("cosmetics_shop_state", { p_user: userId }),
);
return cosmeticShopStateSchema.parse(result);
}