Skip to content

Commit

Permalink
Merge pull request #169 from lensterxyz/feat/verified-api
Browse files Browse the repository at this point in the history
feat: add verified api
  • Loading branch information
bigint committed Jul 29, 2022
2 parents 932f773 + c517f8b commit 8f46169
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/pages/api/verified.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { withSentry } from '@sentry/nextjs'
import { mainnetVerified, testnetVerified } from 'data/verified'
import { NextApiRequest, NextApiResponse } from 'next'
import { ERROR_MESSAGE, IS_MAINNET } from 'src/constants'

const handler = async (req: NextApiRequest, res: NextApiResponse) => {
try {
return res.status(200).json({
success: true,
network: IS_MAINNET ? 'mainnet' : 'testnet',
profile_ids: IS_MAINNET ? mainnetVerified : testnetVerified
})
} catch (e) {
return res.status(500).json({ success: false, message: ERROR_MESSAGE })
}
}

export default withSentry(handler)

1 comment on commit 8f46169

@vercel
Copy link

@vercel vercel bot commented on 8f46169 Jul 29, 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.