Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
karannakra committed May 16, 2023
1 parent 4bc6b66 commit 9a605a8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
30 changes: 30 additions & 0 deletions file.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import subprocess

file_paths = [
'/Users/karannakra/Desktop/b2b-saaskit/src/components/Counter.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/Login.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/LoginPasswordless.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/PropelAuthCSS.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/Signup.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/app/App.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/fogbender/Support.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/head/posthog.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/landing/Dev.astro',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/landing/Prod.astro',
'/Users/karannakra/Desktop/b2b-saaskit/src/components/propelauth.tsx',
'/Users/karannakra/Desktop/b2b-saaskit/src/content/config.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/db/db.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/db/scripts/migrate.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/layouts/Layout.astro',
'/Users/karannakra/Desktop/b2b-saaskit/src/lib/propelauth.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/lib/trpc/root.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/lib/trpc/routers/settings.ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/pages/api/orgs/[orgId].ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/pages/api/trpc/[trpc].ts',
'/Users/karannakra/Desktop/b2b-saaskit/src/pages/app/settings.astro',
'/Users/karannakra/Desktop/b2b-saaskit/src/pages/app/support.astro',
]

for file_path in file_paths:
eslint_command = ['npx','eslint', '--fix', file_path]
subprocess.run(eslint_command, check=True)
6 changes: 5 additions & 1 deletion src/pages/api/fogbender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import jsonwebtoken from 'jsonwebtoken';
import { serverEnv } from '../../t3-env';
import type { FogbenderTokenResponse } from '../../types/types';

type RequestData = {
orgId: string | undefined
}

export const post: APIRoute = async ({ request }) => {
const propelauth = initBaseAuth({
authUrl: serverEnv.PUBLIC_AUTH_URL,
Expand All @@ -25,7 +29,7 @@ export const post: APIRoute = async ({ request }) => {
throw new Error('No token');
}

const { orgId } = await request.json();
const { orgId } = await request.json() as RequestData;
if (!orgId) {
throw new Error('No orgId');
}
Expand Down

0 comments on commit 9a605a8

Please sign in to comment.