details: https://code.tryton.org/tryton/commit/6286497d452b
branch: default
user: Cédric Krier <[email protected]>
date: Wed May 06 17:25:44 2026 +0200
description:
Add RPC method name as fragment of the URL for session methods
diffstat:
sao/src/session.js | 33 ++++++++++++++++++---------------
1 files changed, 18 insertions(+), 15 deletions(-)
diffs (69 lines):
diff -r ec8e69a3eb6b -r 6286497d452b sao/src/session.js
--- a/sao/src/session.js Wed May 06 17:24:23 2026 +0200
+++ b/sao/src/session.js Wed May 06 17:25:44 2026 +0200
@@ -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);