Skip to content

Commit

Permalink
create a subscription in stripe
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdiehl committed Jan 18, 2023
1 parent 11000ea commit 7d945c3
Show file tree
Hide file tree
Showing 20 changed files with 621 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -33,7 +33,7 @@ module.exports = {
// allows ignoring ts checks
"@typescript-eslint/ban-ts-comment": "off",
// allows destructuring to ignore fields
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }]
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }],
},
// settings: {
// 'import/parsers': {
Expand Down
181 changes: 176 additions & 5 deletions package-lock.json

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

5 changes: 5 additions & 0 deletions package.json
Expand Up @@ -49,6 +49,8 @@
"@next-auth/prisma-adapter": "^1.0.5",
"@prisma/client": "^4.8.0",
"@react-hook/window-size": "^3.1.1",
"@stripe/react-stripe-js": "^1.16.3",
"@stripe/stripe-js": "^1.46.0",
"@tabler/icons": "1.118",
"@tanstack/react-query": "^4.12.0",
"@tanstack/react-query-devtools": "^4.13.0",
Expand All @@ -66,7 +68,9 @@
"@trpc/react-query": "^10.7.0",
"@trpc/server": "^10.7.0",
"@types/offscreencanvas": "^2019.7.0",
"@types/stripe": "^8.0.417",
"arraybuffer-to-buffer": "^0.0.7",
"axios": "^1.2.3",
"babel-plugin-superjson-next": "^0.4.4",
"blurhash": "^2.0.4",
"cookies-next": "^2.1.1",
Expand Down Expand Up @@ -96,6 +100,7 @@
"sanitize-html": "^2.7.3",
"sharp": "^0.31.2",
"slugify": "^1.6.5",
"stripe": "^11.6.0",
"superjson": "1.9.1",
"unified": "^10.1.2",
"uuid": "^9.0.0",
Expand Down
3 changes: 3 additions & 0 deletions prisma/migrations/20230118010048_stripe_user/migration.sql
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "stripeCustomer" TEXT,
ADD COLUMN "subscription" TEXT;
2 changes: 2 additions & 0 deletions prisma/schema.prisma
Expand Up @@ -58,6 +58,8 @@ model User {
deletedAt DateTime?
preferredModelFormat ModelFileFormat? @default(SafeTensor)
preferredPrunedModel Boolean? @default(false)
stripeCustomer String?
subscription String?
accounts Account[]
sessions Session[]
Expand Down

0 comments on commit 7d945c3

Please sign in to comment.