Open jojo259 opened 10 months ago
Seems to also apply to modelTemplateAdd and modelTemplateRename (potentially others too).
modelTemplateAdd
modelTemplateRename
import requests response = requests.post('http://localhost:8765', json = { 'action': 'modelTemplateRename', 'version': 6, 'params': { 'modelName': 'Basic', 'oldTemplateName': 'Card 1', 'newTemplateName': 'Card 1 renamed' } }) print(response.text)
curl -X POST -H "Content-Type: application/json" -d "{\"action\": \"modelTemplateRename\", \"version\": 6, \"params\": {\"modelName\": \"Basic\", \"oldTemplateName\": \"Card 1\", \"newTemplateName\": \"Card 1 renamed\"}}" http://localhost:8765
Always results in {"result": null, "error": "unsupported action"} no matter which versions, model names, or template names I use and the same applies to the other two actions.
{"result": null, "error": "unsupported action"}
Line of code with that string: https://github.com/FooSoft/anki-connect/blob/master/plugin/__init__.py#L128
Seems to also apply to
modelTemplateAdd
andmodelTemplateRename
(potentially others too).Always results in
{"result": null, "error": "unsupported action"}
no matter which versions, model names, or template names I use and the same applies to the other two actions.Line of code with that string: https://github.com/FooSoft/anki-connect/blob/master/plugin/__init__.py#L128