UNPKG

@npio/internals

Version:

A free visual website editor, powered with your own SolidJS components.

16 lines (12 loc) 323 B
import { normalizePreset } from "../../normalization"; import { useDatabase } from "../prisma"; export const getPreset = async (id: string) => { const db = useDatabase(); const preset = await db.nitroPreset.findUnique({ where: { id, }, }); if (!preset) return; return normalizePreset(preset); };