luci-base: don't append object.method to the RPC url
authorRafał Miłecki <rafal@milecki.pl>
Wed, 23 Sep 2020 11:57:30 +0000 (13:57 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 23 Sep 2020 14:54:18 +0000 (16:54 +0200)
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>
modules/luci-base/htdocs/luci-static/resources/rpc.js

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