This commit is contained in:
Your Name committed 2026-06-22 20:09:42 -04:00
1 parent 7cd288e67e
commit ed69a4b840
6 files changed
+3 -626

No files matched your search

+2 -26
View File
@@ -158,22 +158,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
required: ["id", "translations"]
}
},
{
name: "update_hero_translation",
description: "Add or update translations for a specific hero.",
inputSchema: {
type: "object",
properties: {
id: { type: "number", description: "Hero ID" },
lang: { type: "string", description: "Language code" },
tagline: { type: "string" },
title: { type: "string" },
description: { type: "string" },
buttonText: { type: "string" }
},
required: ["id", "lang"]
}
},
{
name: "update_menu_item_translation",
description: "Add or update translations for a specific menu item.",
@@ -522,16 +507,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
});
return { content: [{ type: "text", text: JSON.stringify({ success: true, pageId: id, translations: res.data?.translations ?? res.data, page: res.data?.page ?? res.data }, null, 2) }] };
}
case "update_hero_translation": {
const { id, lang, tagline, title, description, buttonText } = params as any;
const payload: any = {};
if (tagline) payload.tagline = { [lang]: tagline };
if (title) payload.title = { [lang]: title };
if (description) payload.description = { [lang]: description };
if (buttonText) payload.buttonText = { [lang]: buttonText };
const res = await api.patch(`/hero/${id}/translations`, payload);
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
}
case "update_menu_item_translation": {
const { id, lang, label } = params as any;
const res = await api.patch(`/menus/items/${id}/translations`, {