@bluemarble/bm-components 2.4.4 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -5393,6 +5393,7 @@ var _ApiHelper = class _ApiHelper {
5393
5393
  return async (req, res) => {
5394
5394
  const methods = factory(req, res);
5395
5395
  const handler = methods[req.method];
5396
+ if (req.method === "OPTIONS") return res.status(200).end();
5396
5397
  if (!handler) return res.status(405).json({ error: "M\xE9todo inv\xE1lido" });
5397
5398
  const methodWithMiddlewares = this.middlewares.reduce((acc, fn) => {
5398
5399
  return fn(acc, options);