Use /cdb/cmd instead of /cdb/run

This commit is contained in:
Kovid Goyal 2017-04-30 11:40:21 +05:30
parent 2064a5cd1b
commit b33f00f0ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class DBCtx(object):
def remote_run(self, name, m, *args):
from mechanize import HTTPError, Request
from calibre.utils.serialize import msgpack_loads, msgpack_dumps
url = self.url + '/cdb/run/{}/{}'.format(name, getattr(m, 'version', 0))
url = self.url + '/cdb/cmd/{}/{}'.format(name, getattr(m, 'version', 0))
if self.library_id:
url += '?' + urlencode({'library_id':self.library_id})
rq = Request(url, data=msgpack_dumps(args),

View File

@ -14,7 +14,7 @@ from calibre.utils.serialize import MSGPACK_MIME, msgpack_loads, json_loads
receive_data_methods = {'GET', 'POST'}
@endpoint('/cdb/run/{which}/{version=0}', postprocess=msgpack_or_json, methods=receive_data_methods)
@endpoint('/cdb/cmd/{which}/{version=0}', postprocess=msgpack_or_json, methods=receive_data_methods)
def cdb_run(ctx, rd, which, version):
try:
m = module_for_cmd(which)