@fredrika/mcp-mochi 2.5.0 → 2.6.0
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/index.js +7 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -131,7 +131,6 @@ function toMochiCreateCardRequest(params) {
|
|
|
131
131
|
"deck-id": params.deckId,
|
|
132
132
|
"template-id": params.templateId,
|
|
133
133
|
"manual-tags": params.tags,
|
|
134
|
-
fields: params.fields,
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
136
|
function toMochiUpdateCardRequest(params) {
|
|
@@ -392,13 +391,15 @@ export class MochiClient {
|
|
|
392
391
|
}
|
|
393
392
|
// Build content from field values (joined with separator for multi-field templates)
|
|
394
393
|
const content = fieldValues.join("\n---\n");
|
|
395
|
-
const
|
|
394
|
+
const mochiRequest = {
|
|
396
395
|
content,
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
tags: request.tags,
|
|
396
|
+
"deck-id": request.deckId,
|
|
397
|
+
"template-id": request.templateId,
|
|
398
|
+
"manual-tags": request.tags,
|
|
399
|
+
fields,
|
|
400
400
|
};
|
|
401
|
-
|
|
401
|
+
const response = await this.api.post("/cards", mochiRequest);
|
|
402
|
+
return CreateCardResponseSchema.parse(response.data);
|
|
402
403
|
}
|
|
403
404
|
async deleteCard(cardId) {
|
|
404
405
|
await this.api.delete(`/cards/${cardId}`);
|