2
0

first commit

This commit is contained in:
2024-08-09 00:39:27 +02:00
commit 79688abe2e
5698 changed files with 497838 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
import type { NextApiRequest, NextApiResponse } from "next";
import type { NewCanvas } from "../lib";
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const { card_creation_options } = req.body;
if (!card_creation_options) return res.status(400).json({ message: "Missing card_creation_options" });
const URL = card_creation_options.submit_booking_url;
const canvasData: NewCanvas = {
canvas: {
content: {
components: [
{
type: "button",
id: "submit-issue-form",
label: "Book a meeting",
style: "primary",
action: {
type: "sheet",
url: URL,
},
},
],
},
},
};
return res.status(200).json(canvasData);
}