Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Fix posthog #285

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions app/api/analytics/vsmarketplace/update/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NextResponse } from "next/server";
import validateParams from "../../../../../utils/api/validateParams";
import Airtable from "airtable";
import { missingParamsResponse } from "../../../../../utils/api/responses";
import posthog from "../../../../../utils/posthog/posthog";
import { missingParamsPosthogTracking } from "../../../../../utils/api/posthogTracking";
Airtable.configure({
endpointUrl: "https://api.airtable.com",
apiKey: process.env.AIRTABLE_API_KEY,
Expand Down Expand Up @@ -33,10 +33,7 @@ export async function POST(request: Request) {
const { missingParams } = validateParams(req, ["dailyStats"]);

if (missingParams.length > 0) {
posthog.capture({
event: `${request.url}-missing-params`,
properties: missingParams,
});
missingParamsPosthogTracking({ missingParams, url: request.url });
return missingParamsResponse({ missingParams });
}
const { dailyStats } = req;
Expand Down