@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.
package/dist/worker/index.cjs
CHANGED
|
@@ -7134,9 +7134,10 @@ async function verifySource(req, db, ctx) {
|
|
|
7134
7134
|
return null;
|
|
7135
7135
|
}
|
|
7136
7136
|
var handleBuilderLibraryControl = async (req, url, env, ctx) => {
|
|
7137
|
-
if (
|
|
7137
|
+
if (url.pathname !== BUILDER_LIBRARY_CONTROL_PATH) return null;
|
|
7138
7138
|
const settings = ctx.chapter.builderLibrary;
|
|
7139
7139
|
if (!settings) return json({ error: "not found" }, 404);
|
|
7140
|
+
if (req.method !== "POST") return json({ error: "unauthorized" }, 401);
|
|
7140
7141
|
const db = ctx.makeDb(env);
|
|
7141
7142
|
const verified = await verifySource(req, db, ctx);
|
|
7142
7143
|
if (!verified) return json({ error: "unauthorized" }, 401);
|