Skip to content

Commit

Permalink
Merge pull request #170 from lensterxyz/main
Browse files Browse the repository at this point in the history
main => testnet
  • Loading branch information
bigint authored Jul 29, 2022
2 parents 8b8d111 + 3c31a30 commit 8c440c4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/pages/api/verified.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
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)
.setHeader('Cache-Control', 's-maxage=86400')
.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)

0 comments on commit 8c440c4

Please sign in to comment.