Adds trial banner and in-app upgrade (#1402)
* WIP trial banner * Fixes days left count * Defers stripe loading until needed * Fixes auth issues * Checkout fixes * Allows for signup testing * Debugging checkout * Adds tests for trial banner Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
baa7e868bd
commit
4cd7a4ce5b
11 files changed
+113
-5
No files matched your search
@@ -1,10 +1,9 @@
|
||||
import dayjs from "dayjs";
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { TRIAL_LIMIT_DAYS } from "@lib/config/constants";
|
||||
import prisma from "@lib/prisma";
|
||||
|
||||
const TRIAL_LIMIT_DAYS = 14;
|
||||
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const apiKey = req.headers.authorization || req.query.apiKey;
|
||||
if (process.env.CRON_API_KEY !== apiKey) {
|
||||
|
||||
Reference in new issue
Block a user