diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-04-25 23:31:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 23:31:17 +0300 |
commit | 66bcb98556e5b92b7b6187a5a904e13a408d0ed6 (patch) | |
tree | a65464e4f8ef02401f0c8c6c89ab888c9befa611 /plugins/CoreHome/angularjs/common | |
parent | 0b4d70ac34502b1429d89cbefd23a1e0c7607d0e (diff) |
Merge json2 renderer w/ json so json now has correct rendering of arrays. (#15851)
* Merge json2 renderer w/ json so json now has correct rendering of arrays.
* update changelog
* update submodule
* fix test
Co-authored-by: sgiehl <stefan@matomo.org>
Diffstat (limited to 'plugins/CoreHome/angularjs/common')
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/piwik-api.js | 4 | ||||
-rw-r--r-- | plugins/CoreHome/angularjs/common/services/piwik-api.spec.js | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/CoreHome/angularjs/common/services/piwik-api.js b/plugins/CoreHome/angularjs/common/services/piwik-api.js index 51d6b652a4..97a6d28bfa 100644 --- a/plugins/CoreHome/angularjs/common/services/piwik-api.js +++ b/plugins/CoreHome/angularjs/common/services/piwik-api.js @@ -133,7 +133,7 @@ var hasBlockedContent = false; }; var requestFormat = format; - if (getParams.format && getParams.format.toLowerCase() !== 'json' && getParams.format.toLowerCase() !== 'json2') { + if (getParams.format && getParams.format.toLowerCase() !== 'json' && getParams.format.toLowerCase() !== 'json') { requestFormat = getParams.format; } @@ -262,7 +262,7 @@ var hasBlockedContent = false; getParams.module = getParams.module || 'API'; if (!getParams.format) { - getParams.format = 'JSON2'; + getParams.format = 'JSON'; } addParams(getParams); diff --git a/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js b/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js index bab2b7c6ff..de457c82cc 100644 --- a/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js +++ b/plugins/CoreHome/angularjs/common/services/piwik-api.spec.js @@ -55,7 +55,7 @@ piwikApi.fetch({ method: "SomePlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); + expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON&idSite=1&period=day&date="); done(); }).catch(function (ex) { @@ -115,7 +115,7 @@ piwikApi.fetch({ method: "SomePlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); + expect(response).to.equal("Request url: index.php?method=SomePlugin.action&module=API&format=JSON&idSite=1&period=day&date="); request1Done = true; @@ -127,7 +127,7 @@ piwikApi.fetch({ method: "SomeOtherPlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); + expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON&idSite=1&period=day&date="); request2Done = true; @@ -160,7 +160,7 @@ piwikApi.fetch({ method: "SomeOtherPlugin.action" }).then(function (response) { - expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON2&idSite=1&period=day&date="); + expect(response).to.equal("Request url: index.php?method=SomeOtherPlugin.action&module=API&format=JSON&idSite=1&period=day&date="); request2Done = true; @@ -216,7 +216,7 @@ method: "SomeOtherPlugin.action" } ]).then(function (response) { - var restOfExpected = "index.php?method=API.getBulkRequest&module=API&format=JSON2&idSite=1&period=day&date= - " + var restOfExpected = "index.php?method=API.getBulkRequest&module=API&format=JSON&idSite=1&period=day&date= - " + "urls%5B%5D=%3Fmethod%3DSomePlugin.action%26param%3Dvalue&urls%5B%5D=%3Fmethod%3DSomeOtherPlugin.action" + "&token_auth=100bf5eeeed1468f3f9d93750044d3dd&force_api_session=1"; |