diff --git a/pages/api/products/index.js b/pages/api/products/index.js index 06b91687f7..3e91fa90d2 100644 --- a/pages/api/products/index.js +++ b/pages/api/products/index.js @@ -6,7 +6,7 @@ export default async function handler(req, res) { const token = cookies.token - dbConnect(); + await dbConnect(); if (method === "GET") { try {