Skip to content

Commit

Permalink
Environment Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
VVoruganti committed Oct 25, 2024
1 parent 161683f commit 312c66a
Show file tree
Hide file tree
Showing 4 changed files with 1,417 additions and 1,497 deletions.
11 changes: 9 additions & 2 deletions api/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ URL=http://localhost:3000
HONCHO_URL=https://demo.honcho.dev
HONCHO_APP_NAME=

# Sentry
SENTRY_DSN_API=
SENTRY_ENVIORNMENT=

# Supabase
SUPABASE_URL=
SUPABSE_KEY=
SUPABASE_URL=<Supabase Project URL>
SUPABSE_KEY=<Supabase Service Key

# Stripe
STRIPE_ENABLED=
3 changes: 1 addition & 2 deletions api/security.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
supabase_key = getenv("SUPABASE_KEY", "")
supabase: Client = create_client(supabase_url, supabase_key)

JWT_SECRET = getenv("JWT_SECRET")
STRIPE_ENABLED = getenv("STRIPE_ENABLED")

security = HTTPBearer()
Expand Down Expand Up @@ -58,7 +57,7 @@ def verify_auth(user: User, input_id: str, subscription_check: bool = False):
status_code=403, detail="Not authorized to access this resource"
)

if not subscription_check:
if not subscription_check or not STRIPE_ENABLED:
return

sub = supabase.table("subscriptions").select("*").eq("user_id", user.id).execute()
Expand Down
24 changes: 12 additions & 12 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
"sync-stripe": "node utils/stripe/sync.ts"
},
"dependencies": {
"@sentry/nextjs": "^8.34.0",
"@stripe/stripe-js": "^4.8.0",
"@sentry/nextjs": "^8.35.0",
"@stripe/stripe-js": "^4.9.0",
"@supabase/ssr": "^0.5.1",
"@supabase/supabase-js": "^2.45.4",
"@supabase/supabase-js": "^2.45.6",
"katex": "^0.16.11",
"next": "^14.2.15",
"posthog-js": "^1.167.0",
"next": "^14.2.16",
"posthog-js": "^1.176.0",
"react": "18.3.1",
"react-dom": "18.2.0",
"react-icons": "^4.12.0",
"react-loading-skeleton": "^3.5.0",
"react-markdown": "^8.0.7",
"react-syntax-highlighter": "^15.5.0",
"react-syntax-highlighter": "^15.6.1",
"react-toggle-dark-mode": "^1.1.1",
"rehype-katex": "^7.0.1",
"remark-math": "^6.0.0",
"retry": "^0.13.1",
"sharp": "^0.32.6",
"stripe": "^16.12.0",
"sweetalert2": "^11.14.2",
"sweetalert2": "^11.14.4",
"sweetalert2-react-content": "^5.0.7",
"swr": "^2.2.5"
},
"devDependencies": {
"@eslint/js": "^9.12.0",
"@eslint/js": "^9.13.0",
"@types/node": "20.5.4",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
Expand All @@ -45,18 +45,18 @@
"autoprefixer": "10.4.15",
"dotenv": "^16.4.5",
"encoding": "^0.1.13",
"eslint": "^9.12.0",
"eslint": "^9.13.0",
"eslint-config-next": "^13.5.7",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react": "^7.37.2",
"globals": "^15.11.0",
"postcss": "8.4.28",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.5.14",
"supabase": "^1.204.3",
"supabase": "^1.207.9",
"tailwindcss": "3.3.3",
"typescript": "5.1.6",
"typescript-eslint": "^8.8.1"
"typescript-eslint": "^8.11.0"
},
"prettier": {
"trailingComma": "es5",
Expand Down
Loading

0 comments on commit 312c66a

Please sign in to comment.