checks.js
function(request, response, next){
		var apptkn;
		if (!utils.Misc.isNullOrUndefined(request.get(X_BOLT_APP_TOKEN))) {
			apptkn = request.get(X_BOLT_APP_TOKEN);
		}
		else {
			var error = new Error(errors['110']);
			response.end(utils.Misc.createResponse(null, error, 110));
			return;
		}

		var name = __getAppFromAppToken(apptkn, request);
		if (utils.Misc.isNullOrUndefined(name)) {
			var error = new Error(errors['113']);
			response.end(utils.Misc.createResponse(null, error, 113));
			return;
		}
		var appnm = utils.String.trim(name.toLowerCase());
		request.appName = appnm;

		next();
	}
function(request, response, next){
		var apptkn;
		if (!utils.Misc.isNullOrUndefined(request.get(X_BOLT_APP_TOKEN))) {
			apptkn = request.get(X_BOLT_APP_TOKEN);
		}
		else {
			var error = new Error(errors['110']);
			response.end(utils.Misc.createResponse(null, error, 110));
			return;
		}

		var name = __getAppFromAppToken(apptkn, request);
		if (utils.Misc.isNullOrUndefined(name)) {
			var error = new Error(errors['113']);
			response.end(utils.Misc.createResponse(null, error, 113));
			return;
		}
		var appnm = utils.String.trim(name.toLowerCase());
		request.appName = appnm;

		next();
	}
function ( request , response , next ) { var apptkn ; if ( ! utils . Misc . isNullOrUndefined ( request . get ( X_BOLT_APP_TOKEN ) ) ) { apptkn = request . get ( X_BOLT_APP_TOKEN ) ; } else { var error = new Error ( errors [ '110' ] ) ; response . end ( utils . Misc . createResponse ( null , error , 110 ) ) ; return ; } var name = __getAppFromAppToken ( apptkn , request ) ; if ( utils . Misc . isNullOrUndefined ( name ) ) { var error = new Error ( errors [ '113' ] ) ; response . end ( utils . Misc . createResponse ( null , error , 113 ) ) ; return ; } var appnm = utils . String . trim ( name . toLowerCase ( ) ) ; request . appName = appnm ; next ( ) ; }
gets the app name from the request
gets the app name from the request