More Polish (#4336)

Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
Joe Milazzo
2026-01-10 10:06:52 -07:00
committed by GitHub
parent aed86b9754
commit dec65b9262
38 changed files with 4949 additions and 148 deletions
+12 -3
View File
@@ -56,9 +56,6 @@ public class UsersController : BaseApiController
_unitOfWork.UserRepository.Delete(user);
//(TODO: After updating a role or removing a user, delete their token)
// await _userManager.RemoveAuthenticationTokenAsync(user, TokenOptions.DefaultProvider, RefreshTokenName);
if (await _unitOfWork.CommitAsync()) return Ok();
return BadRequest(await _localizationService.Translate(UserId, "generic-user-delete"));
@@ -92,6 +89,18 @@ public class UsersController : BaseApiController
return Ok(_mapper.Map<MemberInfoDto>(user));
}
/// <summary>
/// Does the requested user have their profile sharing on
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
[HttpGet("has-profile-shared")]
[Authorize]
public async Task<ActionResult<bool>> HasProfileShared(int userId)
{
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(userId);
return Ok(user?.UserPreferences.SocialPreferences.ShareProfile);
}
[HttpGet("has-reading-progress")]
public async Task<ActionResult<bool>> HasReadingProgress(int libraryId)