-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rubric dev deps * rubric tailwind * rubric prettier * clean next * rubric tsconfig * rubric eslint * update env.mjs * update env imports * move components and styles to lib * update alias imports * add bleed, format, lint and prisma utils to pkg.json * run bleed * strip package.json * ran lint:fix and format * add vscode settings * stripe bump * github bump * seperate tools * tests folder * more aliasing of imports * build warnings
- Loading branch information
1 parent
2e66bc7
commit 46ca232
Showing
52 changed files
with
1,510 additions
and
1,618 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
extends: ['@rubriclab/eslint-config'], | ||
root: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
"typescript", | ||
"typescriptreact", | ||
"json" | ||
], | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
import { stripe } from "lib/stripe"; | ||
import { createPaymentLink } from "lib/utils/payment"; | ||
import {stripe} from '~/stripe' | ||
import {createPaymentLink} from '~/utils/payment' | ||
|
||
/** | ||
* Generate a Stripe payment URL for a customer. | ||
*/ | ||
export const POST = async (req: Request) => { | ||
const { tier, email, customerId } = (await req.json()) as any; | ||
const {tier, email, customerId} = (await req.json()) as any | ||
|
||
if (!customerId) { | ||
return Response.json( | ||
{ | ||
message: "Missing customer ID", | ||
}, | ||
{ status: 400 } | ||
); | ||
} | ||
if (!customerId) | ||
return Response.json( | ||
{ | ||
message: 'Missing customer ID' | ||
}, | ||
{status: 400} | ||
) | ||
|
||
try { | ||
const url = await createPaymentLink(stripe, customerId, tier, email); | ||
try { | ||
const url = await createPaymentLink(stripe, customerId, tier, email) | ||
|
||
return Response.json({ | ||
url, | ||
}); | ||
} catch { | ||
return Response.json( | ||
{ | ||
message: "Failed to create Stripe session", | ||
}, | ||
{ status: 500 } | ||
); | ||
} | ||
}; | ||
return Response.json({ | ||
url | ||
}) | ||
} catch { | ||
return Response.json( | ||
{ | ||
message: 'Failed to create Stripe session' | ||
}, | ||
{status: 500} | ||
) | ||
} | ||
} |
Oops, something went wrong.
46ca232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
maige – ./
maige.app
www.maige.app
triage.rubric.sh
maige-rubriclabs.vercel.app
maige-git-main-rubriclabs.vercel.app