Skip to content

Instantly share code, notes, and snippets.

@b-bot
Created November 15, 2022 18:49
Show Gist options
  • Save b-bot/c4ae0f9a6797486109b4953288524849 to your computer and use it in GitHub Desktop.
Save b-bot/c4ae0f9a6797486109b4953288524849 to your computer and use it in GitHub Desktop.
Problematic Lambdas
import type { NextApiRequest, NextApiResponse } from "next"
import { withSentry } from "@sentry/nextjs"
import { BUILD_ID } from "constants/frontend"
const handler = (_req: NextApiRequest, res: NextApiResponse) => {
res.status(200).json({
buildId: BUILD_ID,
})
}
export const config = {
api: {
externalResolver: true,
},
}
export default withSentry(handler)
import type { NextApiRequest, NextApiResponse } from "next"
export default function handler(req: NextApiRequest, res: NextApiResponse) {
res.status(200).json({ status: "ok" })
}
export { APIRoute as default } from "next-s3-upload"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment