x
This commit is contained in:
1 parent
8f466f8d31
commit
3c4bb06003
6 files changed
+281
-4
No files matched your search
@@ -569,8 +569,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
if (params.description) payload.description = params.description;
|
||||
if (params.details) payload.details = params.details;
|
||||
|
||||
const res = await api.patch(`/products/${params.id}`, payload);
|
||||
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
|
||||
await api.patch(`/products/${params.id}`, payload);
|
||||
return {
|
||||
content: [{ type: "text", text: JSON.stringify({ success: true, message: `Product ${params.id} updated successfully.` }, null, 2) }]
|
||||
};
|
||||
}
|
||||
case "update_product_translation": {
|
||||
const payload: any = {};
|
||||
@@ -578,8 +580,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
if (params.description) payload.description = { [params.lang]: params.description };
|
||||
if (params.details) payload.details = { [params.lang]: params.details };
|
||||
|
||||
const res = await api.patch(`/products/${params.id}`, payload);
|
||||
return { content: [{ type: "text", text: JSON.stringify(res.data, null, 2) }] };
|
||||
await api.patch(`/products/${params.id}`, payload);
|
||||
return {
|
||||
content: [{ type: "text", text: JSON.stringify({ success: true, message: `Translation for language '${params.lang}' updated successfully on product ${params.id}.` }, null, 2) }]
|
||||
};
|
||||
}
|
||||
case "upload_product_image_from_url": {
|
||||
// 1. Download image
|
||||
|
||||
Reference in new issue
Block a user