All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 7m10s
16 lines
412 B
TypeScript
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);
|
|
}
|