Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Applying code review

  • Loading branch information...
commit 2ced2e8c9b43b4f71c538ae86c14877145dd374e 1 parent c2791bf
@andrerod andrerod authored
Showing with 5 additions and 4 deletions.
  1. +3 −3 lib/services/sqlAzure/sqlservice.js
  2. +2 −1  lib/util/constants.js
View
6 lib/services/sqlAzure/sqlservice.js
@@ -86,7 +86,7 @@ SqlService.prototype.createServerDatabase = function (databaseName, optionsOrCal
var databaseXml = DatabaseResult.serialize(databaseName, options.collation, options.edition, options.maxSizeInGB);
- var webResource = WebResource.post('/v1/ManagementService.svc/Server2(\'' + this.serverName + '\')/Databases');
+ var webResource = WebResource.post(SqlAzureConstants.MANAGEMENT_SERVICE_URI + 'Server2(\'' + this.serverName + '\')/Databases');
webResource.addOptionalHeader(HeaderConstants.CONTENT_TYPE, 'application/atom+xml;charset="utf-8"');
webResource.addOptionalHeader(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(databaseXml, 'utf8'));
@@ -117,7 +117,7 @@ SqlService.prototype.createServerDatabase = function (databaseName, optionsOrCal
SqlService.prototype.deleteServerDatabase = function (databaseId, callback) {
validateCallback(callback);
- var webResource = WebResource.del('/v1/ManagementService.svc/Server2(\'' + this.serverName + '\')/Databases(' + databaseId + ')');
+ var webResource = WebResource.del(SqlAzureConstants.MANAGEMENT_SERVICE_URI + 'Server2(\'' + this.serverName + '\')/Databases(' + databaseId + ')');
var processResponseCallback = function (responseObject, next) {
var finalCallback = function (returnObject) {
@@ -138,7 +138,7 @@ SqlService.prototype.deleteServerDatabase = function (databaseId, callback) {
SqlService.prototype.listServerDatabases = function (callback) {
validateCallback(callback);
- var webResource = WebResource.get('/v1/ManagementService.svc/Server2(\'' + this.serverName + '\')/Databases');
+ var webResource = WebResource.get(SqlAzureConstants.MANAGEMENT_SERVICE_URI + 'Server2(\'' + this.serverName + '\')/Databases');
var processResponseCallback = function (responseObject, next) {
if (!responseObject.error) {
View
3  lib/util/constants.js
@@ -2512,7 +2512,8 @@ var Constants = {
},
SqlAzureConstants: {
- SQL_SERVER_MANAGEMENT_COOKIE: '.SQLSERVERMANAGEMENT'
+ SQL_SERVER_MANAGEMENT_COOKIE: '.SQLSERVERMANAGEMENT',
+ MANAGEMENT_SERVICE_URI: '/v1/ManagementService.svc/'
},
BlobErrorCodeStrings: {
Please sign in to comment.
Something went wrong with that request. Please try again.