test(api): section-prefix tool URLs across integration, docker, and e2e api specs

This commit is contained in:
SnapOtter
2026-06-20 12:24:50 +08:00
parent fc205c7428
commit f80444791b
213 changed files with 2868 additions and 2846 deletions
+4 -2
View File
@@ -26,7 +26,9 @@ async function callTool(path, settings, filename = "test.webp") {
const formData = new FormData();
formData.append("file", new File([imageBlob], filename, { type: "image/webp" }));
formData.append("settings", JSON.stringify(settings));
const res = await fetch(`${BASE}/api/v1/tools/${path}`, {
// All audited tools are image-modality; section prefix hardcoded
// (cannot import apiToolPath from @snapotter/shared in plain .mjs).
const res = await fetch(`${BASE}/api/v1/tools/image/${path}`, {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
body: formData,
@@ -259,7 +261,7 @@ async function main() {
const formData = new FormData();
formData.append("file", new File([imageBlob], "test.webp", { type: "image/webp" }));
formData.append("settings", JSON.stringify({}));
const res = await fetch(`${BASE}/api/v1/tools/favicon`, {
const res = await fetch(`${BASE}/api/v1/tools/image/favicon`, {
method: "POST",
headers: { Authorization: `Bearer ${token}` },
body: formData,