Add public profiles and cosmetic shop
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 7m10s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 7m10s
This commit is contained in:
15
lib/profile-cosmetics.ts
Normal file
15
lib/profile-cosmetics.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user