@odla-ai/chapter 0.43.1 → 0.43.2

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.
@@ -7108,9 +7108,10 @@ async function verifySource(req, db, ctx) {
7108
7108
  return null;
7109
7109
  }
7110
7110
  var handleBuilderLibraryControl = async (req, url, env, ctx) => {
7111
- if (req.method !== "POST" || url.pathname !== BUILDER_LIBRARY_CONTROL_PATH) return null;
7111
+ if (url.pathname !== BUILDER_LIBRARY_CONTROL_PATH) return null;
7112
7112
  const settings = ctx.chapter.builderLibrary;
7113
7113
  if (!settings) return json({ error: "not found" }, 404);
7114
+ if (req.method !== "POST") return json({ error: "unauthorized" }, 401);
7114
7115
  const db = ctx.makeDb(env);
7115
7116
  const verified = await verifySource(req, db, ctx);
7116
7117
  if (!verified) return json({ error: "unauthorized" }, 401);