Skip to content

Commit 19c4bd4

Browse files
author
Musa Demir
committed
replaces manual json string creation with JSON.stringify
1 parent ea01ef0 commit 19c4bd4

File tree

1 file changed

+8
-2
lines changed
  • aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/wwwroot/swagger/ui

1 file changed

+8
-2
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/wwwroot/swagger/ui/abp.swagger.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,11 @@ var abp = abp || {};
6666
xhr.setRequestHeader('Abp.TenantId', tenantId);
6767
xhr.setRequestHeader('Content-type', 'application/json');
6868
addAntiForgeryTokenToXhr(xhr);
69-
xhr.send("{" + "usernameOrEmailAddress:'" + usernameOrEmailAddress + "'," + "password:'" + password + "'}");
69+
xhr.send(
70+
JSON.stringify(
71+
{ usernameOrEmailAddress: usernameOrEmailAddress, password: password }
72+
)
73+
);
7074
};
7175

7276
abp.swagger.login = function (callback) {
@@ -90,7 +94,9 @@ var abp = abp || {};
9094
xhrTenancyName.open('POST', '/api/services/app/Account/IsTenantAvailable', true);
9195
xhrTenancyName.setRequestHeader('Content-type', 'application/json');
9296
addAntiForgeryTokenToXhr(xhrTenancyName);
93-
xhrTenancyName.send("{" + "tenancyName:'" + tenancyName + "'}");
97+
xhrTenancyName.send(
98+
JSON.stringify({ tenancyName: tenancyName })
99+
);
94100
} else {
95101
loginUserInternal(null, callback); // Login for host
96102
}

0 commit comments

Comments
 (0)