Skip to content

Commit

Permalink
fix: ⏪️ Remove credentials name check
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Apr 21, 2022
1 parent f788541 commit 937621e
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions apps/builder/pages/api/integrations/google-sheets/spreadsheets.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import { NextApiRequest, NextApiResponse } from 'next'
import { drive } from '@googleapis/drive'
import { getAuthenticatedGoogleClient } from 'libs/google-sheets'
import {
badRequest,
forbidden,
methodNotAllowed,
notAuthenticated,
} from 'utils'
import { captureException, setUser, withSentry } from '@sentry/nextjs'
import { badRequest, methodNotAllowed, notAuthenticated } from 'utils'
import { setUser, withSentry } from '@sentry/nextjs'
import { getAuthenticatedUser } from 'services/api/utils'

const handler = async (req: NextApiRequest, res: NextApiResponse) => {
Expand All @@ -22,14 +17,6 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
if (!auth)
return res.status(404).send("Couldn't find credentials in database")
console.log(auth.credentials.name, user.email)
if (auth.credentials.name !== user.email) {
captureException(
new Error(
`Credentials name does not match user email ${auth?.credentials.name} !== ${user.email}`
)
)
return forbidden(res)
}
const response = await drive({
version: 'v3',
auth: auth.client,
Expand Down

4 comments on commit 937621e

@vercel
Copy link

@vercel vercel bot commented on 937621e Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 937621e Apr 21, 2022

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:

builder-v2 – ./apps/builder

builder-v2-git-main-typebot-io.vercel.app
app.typebot.io
builder-v2-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 937621e Apr 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.