Skip to content

Commit

Permalink
feat: add makeswift api handler
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewvolk committed Jun 17, 2024
1 parent e654829 commit 9fef5ad
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/api/makeswift/[...makeswift]/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { MakeswiftApiHandler } from '@makeswift/runtime/next/server';
import { strict } from 'assert';

import { runtime } from '~/makeswift/runtime';

strict(process.env.MAKESWIFT_SITE_API_KEY, 'MAKESWIFT_SITE_API_KEY is required');

const handler = MakeswiftApiHandler(process.env.MAKESWIFT_SITE_API_KEY, {
runtime,
});

export { handler as GET, handler as POST };

0 comments on commit 9fef5ad

Please sign in to comment.