2
0

build(viewer): 🏗️ Add sentry to viewer

This commit is contained in:
Baptiste Arnaud
2022-02-15 08:43:11 +01:00
parent ea80fd6d3e
commit b339add838
13 changed files with 253 additions and 5 deletions

View File

@ -5,6 +5,7 @@ import { createTransport } from 'nodemailer'
import { decrypt, initMiddleware } from 'utils'
import Cors from 'cors'
import { withSentry } from '@sentry/nextjs'
const cors = initMiddleware(Cors())
@ -74,4 +75,4 @@ const getEmailInfo = async (
return decrypt(credentials.data, credentials.iv) as SmtpCredentialsData
}
export default handler
export default withSentry(handler)

View File

@ -4,6 +4,7 @@ import { GoogleSpreadsheet } from 'google-spreadsheet'
import { getAuthenticatedGoogleClient } from 'libs/google-sheets'
import { Cell } from 'models'
import Cors from 'cors'
import { withSentry } from '@sentry/nextjs'
const cors = initMiddleware(Cors())
const handler = async (req: NextApiRequest, res: NextApiResponse) => {
@ -74,4 +75,4 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
return methodNotAllowed(res)
}
export default handler
export default withSentry(handler)