Skip to content

Commit

Permalink
fixed eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
LiveDuo committed Sep 1, 2023
1 parent f433430 commit b5c8123
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 13 deletions.
4 changes: 3 additions & 1 deletion dev/nextjs-project/pages/api/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const form = new formidable.IncomingForm()

const formParse = (req) => new Promise((r, j) => form.parse(req, (e, f) => (!e ? r(f) : j(e))))

export default async (req, res) => {
const handler = async (req, res) => {
try {
const fields = await formParse(req)
console.log(fields)
Expand All @@ -14,4 +14,6 @@ export default async (req, res) => {
}
}

export default handler

export const config = { api: { bodyParser: false } }
Loading

0 comments on commit b5c8123

Please sign in to comment.