mirror of
				https://github.com/D4M13N-D3V/comissions-app-core-api.git
				synced 2025-10-31 09:35:25 +00:00 
			
		
		
		
	fix: changed the artist access accept and deny to take the requset id instead of thhe user id
This commit is contained in:
		
							parent
							
								
									c01547e92d
								
							
						
					
					
						commit
						89ebec93c2
					
				| @ -70,10 +70,10 @@ public class AdminArtistRequestsController : Controller | |||||||
|     /// <param name="userId">The ID of the user to accept the request for.</param> |     /// <param name="userId">The ID of the user to accept the request for.</param> | ||||||
|     /// <returns>The new seller profile.</returns> |     /// <returns>The new seller profile.</returns> | ||||||
|     [HttpPut] |     [HttpPut] | ||||||
|     [Route("{userId}")] |     [Route("{requestId:int}")] | ||||||
|     public async Task<IActionResult> AcceptArtistRequest(string userId) |     public async Task<IActionResult> AcceptArtistRequest(int requestId) | ||||||
|     { |     { | ||||||
|         var request = await _dbContext.ArtistRequests.FirstOrDefaultAsync(request=>request.UserId==userId); |         var request = await _dbContext.ArtistRequests.FirstOrDefaultAsync(request=>request.Id==requestId); | ||||||
|          |          | ||||||
|         if(request==null) |         if(request==null) | ||||||
|             return NotFound("No request for that user exists."); |             return NotFound("No request for that user exists."); | ||||||
| @ -86,7 +86,7 @@ public class AdminArtistRequestsController : Controller | |||||||
|         var accountId = _paymentService.CreateArtistAccount(); |         var accountId = _paymentService.CreateArtistAccount(); | ||||||
|         var newArtist = new UserArtist() |         var newArtist = new UserArtist() | ||||||
|         { |         { | ||||||
|             UserId = userId, |             UserId = request.UserId, | ||||||
|             AgeRestricted = false, |             AgeRestricted = false, | ||||||
|             Description = string.Empty, |             Description = string.Empty, | ||||||
|             StripeAccountId = accountId, |             StripeAccountId = accountId, | ||||||
| @ -147,7 +147,7 @@ public class AdminArtistRequestsController : Controller | |||||||
|             EventName = "artistrequestaccepted", |             EventName = "artistrequestaccepted", | ||||||
|             To = |             To = | ||||||
|             { |             { | ||||||
|                 SubscriberId = userId, |                 SubscriberId = request.UserId, | ||||||
|             }, |             }, | ||||||
|             Payload = { } |             Payload = { } | ||||||
|         }; |         }; | ||||||
| @ -156,10 +156,10 @@ public class AdminArtistRequestsController : Controller | |||||||
|     } |     } | ||||||
|      |      | ||||||
|     [HttpDelete] |     [HttpDelete] | ||||||
|     [Route("{userId}")] |     [Route("{requestId:int}")] | ||||||
|     public async Task<IActionResult> DenyArtistRequest(string userId) |     public async Task<IActionResult> DenyArtistRequest(int requestId) | ||||||
|     { |     { | ||||||
|         var request = await _dbContext.ArtistRequests.FirstOrDefaultAsync(request=>request.UserId==userId); |         var request = await _dbContext.ArtistRequests.FirstOrDefaultAsync(request=>request.Id==requestId); | ||||||
|          |          | ||||||
|         if(request==null) |         if(request==null) | ||||||
|             return NotFound("No request for that user exists."); |             return NotFound("No request for that user exists."); | ||||||
| @ -174,7 +174,7 @@ public class AdminArtistRequestsController : Controller | |||||||
|             EventName = "artistrequestdenied", |             EventName = "artistrequestdenied", | ||||||
|             To = |             To = | ||||||
|             { |             { | ||||||
|                 SubscriberId = userId, |                 SubscriberId = request.UserId, | ||||||
|             }, |             }, | ||||||
|             Payload = { } |             Payload = { } | ||||||
|         }; |         }; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Damien Ostler
						Damien Ostler