first commit
This commit is contained in:
14
calcom/packages/app-store/_utils/getParsedAppKeysFromSlug.ts
Normal file
14
calcom/packages/app-store/_utils/getParsedAppKeysFromSlug.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import type Zod from "zod";
|
||||
import type z from "zod";
|
||||
|
||||
import getAppKeysFromSlug from "./getAppKeysFromSlug";
|
||||
|
||||
export async function getParsedAppKeysFromSlug<T extends Zod.Schema>(
|
||||
slug: string,
|
||||
schema: T
|
||||
): Promise<z.infer<T>> {
|
||||
const appKeys = await getAppKeysFromSlug(slug);
|
||||
return schema.parse(appKeys);
|
||||
}
|
||||
|
||||
export default getParsedAppKeysFromSlug;
|
||||
Reference in New Issue
Block a user