Skip to content

Commit

Permalink
Remove customer groups from example (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattvagni authored May 22, 2023
1 parent fd041a1 commit 8958794
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@types/ua-parser-js": "^0.7.36",
"assert-ts": "^0.3.4",
"csstype": "^3.1.2",
"lodash": "^4.17.21",
"next": "13.3.2",
"prettier": "2.8.8",
"react": "18.2.0",
Expand Down
11 changes: 0 additions & 11 deletions pages/api/contact-form.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { inspect } from 'util';
import { PlainClient, UpsertCustomTimelineEntryInput } from '@team-plain/typescript-sdk';
import _ from 'lodash';
import type { NextApiRequest, NextApiResponse } from 'next';

const apiKey = process.env.PLAIN_API_KEY;
Expand All @@ -13,8 +12,6 @@ const client = new PlainClient({
apiKey,
});

const customerGroupKeys = ['free-tier', 'design-partner', 'enterprise'] as const;

export type ResponseData = {
error: string | null;
};
Expand Down Expand Up @@ -44,14 +41,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse<
},
onCreate: {
fullName: body.customer.name,
customerGroupIdentifiers: [
{
// Here we are picking a random customer group to add the customer to
// for demo purposes but you could use your own logic to decide which group
// a customer should be part of.
customerGroupKey: _.sample(customerGroupKeys),
},
],
email: {
email: body.customer.email,
isVerified: true,
Expand Down

2 comments on commit 8958794

@vercel
Copy link

@vercel vercel bot commented on 8958794 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 8958794 May 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.