From aea78aff437103cee09c08823748f9da99f885a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 6 May 2026 17:25:44 +0200 Subject: [PATCH] Add RPC method name as fragment of the URL for session methods (grafted from 6286497d452bfbb965b9df7341b93c025aab16d7) --HG-- branch : 8.0 --- sao/src/session.js | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/sao/src/session.js b/sao/src/session.js index ed7386ed13..4e2a1de155 100644 --- a/sao/src/session.js +++ b/sao/src/session.js @@ -181,15 +181,16 @@ Sao.Session.server_version = function() { var timeoutID = Sao.common.processing.show(); - return jQuery.ajax({ - 'contentType': 'application/json', - 'data': JSON.stringify({ + let args = { 'id': 0, 'method': 'common.server.version', 'params': [] - }), + }; + return jQuery.ajax({ + 'contentType': 'application/json', + 'data': JSON.stringify(args), 'dataType': 'json', - 'url': 'rpc/', + 'url': 'rpc/#' + args.method, 'type': 'post', 'complete': [function() { Sao.common.processing.hide(timeoutID); @@ -594,15 +595,16 @@ Sao.DB.list = function() { var timeoutID = Sao.common.processing.show(); - return jQuery.ajax({ - 'contentType': 'application/json', - 'data': JSON.stringify({ + let args = { 'id': 0, 'method': 'common.db.list', 'params': [] - }), + }; + return jQuery.ajax({ + 'contentType': 'application/json', + 'data': JSON.stringify(args), 'dataType': 'json', - 'url': 'rpc/', + 'url': 'rpc/#' + args.method, 'type': 'post', 'complete': [function() { Sao.common.processing.hide(timeoutID); @@ -616,15 +618,16 @@ Sao.Authentication.services = function() { var timeoutID = Sao.common.processing.show(); - return jQuery.ajax({ - 'contentType': 'application/json', - 'data': JSON.stringify({ + let args = { 'id': 0, 'method': 'common.authentication.services', 'params': [] - }), + } + return jQuery.ajax({ + 'contentType': 'application/json', + 'data': JSON.stringify(args), 'dataType': 'json', - 'url': 'rpc/', + 'url': 'rpc/#' + args.method, 'type': 'post', 'complete': [function() { Sao.common.processing.hide(timeoutID);