Rename class
This commit is contained in:
parent
a246764e44
commit
8058add053
2 changed files with 5 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
namespace DrinkRateAPI.ApiModels.UserProfile;
|
||||
|
||||
public class ChangeAdminStatusBody
|
||||
public class UserProfileAdminStatusPut
|
||||
{
|
||||
public bool ChangeStatusTo { get; set; }
|
||||
}
|
|
@ -18,19 +18,18 @@ public class UserProfileController : ControllerBase
|
|||
_logger = logger;
|
||||
_userProfileService = userProfileService;
|
||||
}
|
||||
|
||||
[HttpPut(Name = "user_profile")]
|
||||
public UserProfileGet PutUserProfile(UserProfilePut userProfile)
|
||||
|
||||
public UserProfileGet PutUserProfile([FromBody] UserProfilePut userProfile)
|
||||
{
|
||||
throw new ApplicationException();
|
||||
var x = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; //HttpContext.User.Identities.First();
|
||||
return new();
|
||||
}
|
||||
|
||||
|
||||
[HttpPut("{userId}/adminStatus")]
|
||||
[Authorize(Policy = "AdminOnly")]
|
||||
[Produces("application/json")]
|
||||
public async Task<IActionResult> PutUserAdminStatus(string userId, [FromBody] ChangeAdminStatusBody body)
|
||||
public async Task<IActionResult> PutUserAdminStatus(string userId, [FromBody] UserProfileAdminStatusPut body)
|
||||
{
|
||||
var changedProfile = await _userProfileService.PutUserProfileAdminStatusAsync(userId, body.ChangeStatusTo);
|
||||
|
||||
|
|
Loading…
Reference in a new issue