@@ -339,7 +339,7 @@ public async Task<IHttpActionResult> ChangePlanAsync(string id, string planId, s
339339 if ( organization == null )
340340 return Ok ( ChangePlanResult . FailWithMessage ( "Invalid OrganizationId." ) ) ;
341341
342- BillingPlan plan = BillingManager . GetBillingPlan ( planId ) ;
342+ var plan = BillingManager . GetBillingPlan ( planId ) ;
343343 if ( plan == null )
344344 return Ok ( ChangePlanResult . FailWithMessage ( "Invalid PlanId." ) ) ;
345345
@@ -383,7 +383,7 @@ public async Task<IHttpActionResult> ChangePlanAsync(string id, string planId, s
383383 if ( ! String . IsNullOrWhiteSpace ( couponId ) )
384384 createCustomer . CouponId = couponId ;
385385
386- StripeCustomer customer = await customerService . CreateAsync ( createCustomer ) ;
386+ var customer = await customerService . CreateAsync ( createCustomer ) ;
387387
388388 organization . BillingStatus = BillingStatus . Active ;
389389 organization . RemoveSuspension ( ) ;
@@ -444,14 +444,14 @@ public async Task<IHttpActionResult> AddUserAsync(string id, string email) {
444444 if ( String . IsNullOrEmpty ( id ) || ! CanAccessOrganization ( id ) || String . IsNullOrEmpty ( email ) )
445445 return NotFound ( ) ;
446446
447- Organization organization = await GetModelAsync ( id ) ;
447+ var organization = await GetModelAsync ( id ) ;
448448 if ( organization == null )
449449 return NotFound ( ) ;
450450
451451 if ( ! await _billingManager . CanAddUserAsync ( organization ) )
452452 return PlanLimitReached ( "Please upgrade your plan to add an additional user." ) ;
453453
454- User user = await _userRepository . GetByEmailAddressAsync ( email ) ;
454+ var user = await _userRepository . GetByEmailAddressAsync ( email ) ;
455455 if ( user != null ) {
456456 if ( ! user . OrganizationIds . Contains ( organization . Id ) ) {
457457 user . OrganizationIds . Add ( organization . Id ) ;
@@ -465,7 +465,7 @@ await _messagePublisher.PublishAsync(new UserMembershipChanged {
465465
466466 await _mailer . SendAddedToOrganizationAsync ( CurrentUser , organization , user ) ;
467467 } else {
468- Invite invite = organization . Invites . FirstOrDefault ( i => String . Equals ( i . EmailAddress , email , StringComparison . OrdinalIgnoreCase ) ) ;
468+ var invite = organization . Invites . FirstOrDefault ( i => String . Equals ( i . EmailAddress , email , StringComparison . OrdinalIgnoreCase ) ) ;
469469 if ( invite == null ) {
470470 invite = new Invite {
471471 Token = StringExtensions . GetNewToken ( ) ,
@@ -496,9 +496,9 @@ public async Task<IHttpActionResult> RemoveUserAsync(string id, string email) {
496496 if ( organization == null )
497497 return NotFound ( ) ;
498498
499- User user = await _userRepository . GetByEmailAddressAsync ( email ) ;
499+ var user = await _userRepository . GetByEmailAddressAsync ( email ) ;
500500 if ( user == null || ! user . OrganizationIds . Contains ( id ) ) {
501- Invite invite = organization . Invites . FirstOrDefault ( i => String . Equals ( i . EmailAddress , email , StringComparison . OrdinalIgnoreCase ) ) ;
501+ var invite = organization . Invites . FirstOrDefault ( i => String . Equals ( i . EmailAddress , email , StringComparison . OrdinalIgnoreCase ) ) ;
502502 if ( invite == null )
503503 return Ok ( ) ;
504504
@@ -511,9 +511,9 @@ public async Task<IHttpActionResult> RemoveUserAsync(string id, string email) {
511511 if ( ( await _userRepository . GetByOrganizationIdAsync ( organization . Id ) ) . Total == 1 )
512512 return BadRequest ( "An organization must contain at least one user." ) ;
513513
514- List < Project > projects = ( await _projectRepository . GetByOrganizationIdAsync ( organization . Id ) ) . Documents . Where ( p => p . NotificationSettings . ContainsKey ( user . Id ) ) . ToList ( ) ;
514+ var projects = ( await _projectRepository . GetByOrganizationIdAsync ( organization . Id ) ) . Documents . Where ( p => p . NotificationSettings . ContainsKey ( user . Id ) ) . ToList ( ) ;
515515 if ( projects . Count > 0 ) {
516- foreach ( Project project in projects )
516+ foreach ( var project in projects )
517517 project . NotificationSettings . Remove ( user . Id ) ;
518518
519519 await _projectRepository . SaveAsync ( projects ) ;
0 commit comments