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

Commit

Permalink
Fix posthog (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanDalelR committed Sep 14, 2023
1 parent c727a2d commit fa885ec
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/api/analytics/vsmarketplace/update/route.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { NextResponse } from "next/server";
import validateParams from "../../../../../utils/api/validateParams";
import Airtable from "airtable";
import { missingParamsResponse } from "../../../../../utils/api/responses";
import { missingParamsPosthogTracking } from "../../../../../utils/api/posthogTracking";
Airtable.configure({
endpointUrl: "https://api.airtable.com",
apiKey: process.env.AIRTABLE_API_KEY,
Expand Down Expand Up @@ -31,9 +33,8 @@ export async function POST(request: Request) {
const { missingParams } = validateParams(req, ["dailyStats"]);

if (missingParams.length > 0) {
return NextResponse.json({
error: `Missing parameters: ${missingParams.join(", ")}`,
});
missingParamsPosthogTracking({ missingParams, url: request.url });
return missingParamsResponse({ missingParams });
}
const { dailyStats } = req;
let records;
Expand Down

0 comments on commit fa885ec

Please sign in to comment.