This commit is contained in:
Emily
2024-09-27 20:33:49 +02:00
parent 8e3ad2920f
commit 3c77a727cd
37 changed files with 815 additions and 491752 deletions

View File

@@ -0,0 +1,16 @@
import { getUserProjectFromId } from "~/server/LIVE_DEMO_DATA";
import { SupabaseIntegrationModel } from '@schema/integrations/SupabaseIntegrationSchema';
export default defineEventHandler(async event => {
const project_id = getHeader(event, 'x-pid');
if (!project_id) return;
const user = getRequestUser(event);
const project = await getUserProjectFromId(project_id, user);
if (!project) return;
const integrations = await SupabaseIntegrationModel.find({ project_id });
return integrations;
});