
* Delete api * Fixes circular dependencies * Revert "Delete api" This reverts commit 174177a8331fc376b2dc7abda2c7adc56b24dd60. * Delete _metadata.ts * Update metadata.ts
15 lines
515 B
TypeScript
15 lines
515 B
TypeScript
import { App } from "@calcom/types/App";
|
|
|
|
import appStoreMetadata from "./metadata";
|
|
|
|
/** Mainly to use in listings for the frontend, use in getStaticProps or getServerSideProps */
|
|
export function getAppRegistry() {
|
|
return Object.values(appStoreMetadata).reduce((apps, app) => {
|
|
// Skip if app isn't installed
|
|
if (!app.installed) return apps;
|
|
// Let's not leak api keys to the front end
|
|
const { key, ...metadata } = app;
|
|
apps.push(metadata);
|
|
return apps;
|
|
}, [] as Omit<App, "key">[]);
|
|
}
|