luci-base: don't append object.method to the RPC url

It was a cosmetic feature that doesn't work anymore with the latest
uhttpd ubus API. Adding RESTful API resulted in treating URL part
following the /ubus/ as the new API request.

Suggested-by: Rafał Miłecki <rafal@milecki.pl>
Fixes: #4465
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Rafał Miłecki 2020-09-23 13:57:30 +02:00 committed by Jo-Philipp Wich
parent 6044084a61
commit b17ec0926d

View file

@ -33,9 +33,6 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ {
req[i].params[2] req[i].params[2]
); );
} }
else if (req.params) {
q += '/%s.%s'.format(req.params[1], req.params[2]);
}
return request.post(rpcBaseURL + q, req, { return request.post(rpcBaseURL + q, req, {
timeout: (L.env.rpctimeout || 20) * 1000, timeout: (L.env.rpctimeout || 20) * 1000,