Permalink
Browse files

Adding comments.

  • Loading branch information...
1 parent 7b38833 commit 8e47e251bebf3ccf92c0ad95ff6e670bcfba641e Andre Rodrigues committed Oct 13, 2012
Showing with 7 additions and 5 deletions.
  1. +4 −4 lib/services/core/storageservicesettings.js
  2. +3 −1 lib/util/validate.js
@@ -27,24 +27,24 @@ exports = module.exports = StorageServiceSettings;
var devStoreAccount = null;
var useDevelopmentStorageSetting = ServiceSettings.setting(ConnectionStringKeys.USE_DEVELOPMENT_STORAGE_NAME, true);
-var developmentStorageProxyUriSetting = ServiceSettings.settingWithFunc(ConnectionStringKeys.DEVELOPMENT_STORAGE_PROXY_URI_NAME, Validate.isValidUri;
+var developmentStorageProxyUriSetting = ServiceSettings.settingWithFunc(ConnectionStringKeys.DEVELOPMENT_STORAGE_PROXY_URI_NAME, Validate.isValidUri);
var defaultEndpointsProtocolSetting = ServiceSettings.setting(ConnectionStringKeys.DEFAULT_ENDPOINTS_PROTOCOL_NAME, 'http', 'https');
var accountNameSetting = ServiceSettings.setting(ConnectionStringKeys.ACCOUNT_NAME_NAME);
var accountKeySetting = ServiceSettings.settingWithFunc(ConnectionStringKeys.ACCOUNT_KEY_NAME, Validate.isBase64Encoded);
var blobEndpointSetting = ServiceSettings.settingWithFunc(
ConnectionStringKeys.BLOB_ENDPOINT_NAME,
- Validate.getIsValidUri()
+ Validate.isValidUri
);
var queueEndpointSetting = ServiceSettings.settingWithFunc(
ConnectionStringKeys.QUEUE_ENDPOINT_NAME,
- Validate.getIsValidUri()
+ Validate.isValidUri
);
var tableEndpointSetting = ServiceSettings.settingWithFunc(
ConnectionStringKeys.TABLE_ENDPOINT_NAME,
- Validate.getIsValidUri()
+ Validate.isValidUri
);
var validKeys = [
View
@@ -20,6 +20,7 @@ exports = module.exports;
/**
* Creates a anonymous function that check if the given uri is valid or not.
*
+* @param {string} uri The uri to validate.
* @return {function}
*/
exports.isValidUri = function (uri) {
@@ -35,9 +36,10 @@ exports.isValidUri = function (uri) {
/**
* Creates a anonymous function that check if a given key is base 64 encoded.
*
+* @param {string} key The key to validate.
* @return {function}
*/
-exports.isBase64Encoded = function () {
+exports.isBase64Encoded = function (key) {
var isValidBase64String = key.match('^([A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{4}|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)$');
if (isValidBase64String) {

0 comments on commit 8e47e25

Please sign in to comment.