mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
16 lines
528 B
TypeScript
16 lines
528 B
TypeScript
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;
|
|
|
|
}); |