mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
test(api): section-prefix tool URLs across integration, docker, and e2e api specs
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user