Skip to content

Commit

Permalink
Release v1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrRogov committed Jul 21, 2017
1 parent a1efac2 commit e05de49
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/dwa.js
@@ -1,4 +1,4 @@
/*! dwa v1.2.6 (c) 2017 Aleksandr Rogov */
/*! dwa v1.2.7 (c) 2017 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down
15 changes: 12 additions & 3 deletions dist/dynamics-web-api-callbacks.js
@@ -1,4 +1,4 @@
/*! dynamics-web-api-callbacks v1.2.6 (c) 2017 Aleksandr Rogov */
/*! dynamics-web-api-callbacks v1.2.7 (c) 2017 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -345,8 +345,17 @@ module.exports = function sendRequest(method, uri, config, data, additionalHeade
if (data) {
stringifiedData = JSON.stringify(data, function (key, value) {
/// <param name="key" type="String">Description</param>
if (key.endsWith("@odata.bind") && typeof value === "string" && !value.startsWith(config.webApiUrl)) {
value = config.webApiUrl + value;
if (key.endsWith("@odata.bind")) {
if (typeof value === "string") {
//remove brackets in guid
if (/\(\{[\w\d-]+\}\)/g.test(value)){
value = value.replace(/(.+)\(\{([\w\d-]+)\}\)/g, '$1($2)');
}
//add full web api url if it's not set
if (!value.startsWith(config.webApiUrl)) {
value = config.webApiUrl + value;
}
}
}

return value;
Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api-callbacks.min.js

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions dist/dynamics-web-api.js
@@ -1,4 +1,4 @@
/*! dynamics-web-api v1.2.6 (c) 2017 Aleksandr Rogov */
/*! dynamics-web-api v1.2.7 (c) 2017 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -345,8 +345,17 @@ module.exports = function sendRequest(method, uri, config, data, additionalHeade
if (data) {
stringifiedData = JSON.stringify(data, function (key, value) {
/// <param name="key" type="String">Description</param>
if (key.endsWith("@odata.bind") && typeof value === "string" && !value.startsWith(config.webApiUrl)) {
value = config.webApiUrl + value;
if (key.endsWith("@odata.bind")) {
if (typeof value === "string") {
//remove brackets in guid
if (/\(\{[\w\d-]+\}\)/g.test(value)){
value = value.replace(/(.+)\(\{([\w\d-]+)\}\)/g, '$1($2)');
}
//add full web api url if it's not set
if (!value.startsWith(config.webApiUrl)) {
value = config.webApiUrl + value;
}
}
}

return value;
Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "dynamics-web-api",
"version": "1.2.6",
"version": "1.2.7",
"description": "DynamicsWebApi is a Microsoft Dynamics CRM Web API helper library",
"keywords": [
"crm",
Expand Down

0 comments on commit e05de49

Please sign in to comment.