Openstatus www.openstatus.dev

fix: feature event

+2 -7
+2
packages/api/src/router/stripe/index.ts
··· 9 9 workspacePlans, 10 10 } from "@openstatus/db/src/schema"; 11 11 12 + import { Events } from "@openstatus/analytics"; 12 13 import { allPlans } from "@openstatus/db/src/schema/plan/config"; 13 14 import { addons } from "@openstatus/db/src/schema/plan/schema"; 14 15 import { updateAddonInLimits } from "@openstatus/db/src/schema/plan/utils"; ··· 173 174 }), 174 175 175 176 addAddon: protectedProcedure 177 + .meta({ track: Events.AddFeature, trackProps: ["feature"] }) 176 178 .input( 177 179 z.object({ 178 180 workspaceSlug: z.string(),
-7
packages/api/src/router/stripe/webhook.ts
··· 98 98 .where(eq(user.email, customer.email)) 99 99 .get(); 100 100 if (!userResult) return; 101 - 102 - const analytics = await setupAnalytics({ 103 - userId: `usr_${userResult.id}`, 104 - email: userResult.email || undefined, 105 - workspaceId: String(result.id), 106 - }); 107 - await analytics.track(Events.AddFeature); 108 101 } 109 102 }), 110 103 sessionCompleted: webhookProcedure.mutation(async (opts) => {