Completed the development of tests for FriendsController

This commit is contained in:
Artemy
2025-07-01 11:43:11 +07:00
parent 8e245ea044
commit f855b91155
3 changed files with 210 additions and 2 deletions
@@ -9,7 +9,7 @@ namespace Govor.API.Controllers.AdminStuff;
[Route("api/[controller]")]
[ApiController]
//[Authorize(Roles = "Admin")]
[Authorize(Roles = "Admin")]
public class InviteUserController : Controller
{
private readonly IInvitesRepository _repository;
+1 -1
View File
@@ -88,7 +88,7 @@ public class FriendsController : Controller
catch (InvalidOperationException ex)
{
_logger.LogError(ex, ex.Message);
return BadRequest(new { error = "Failed to get friend requests. User data missing." });
return BadRequest("Failed to get friend requests. User data missing.");
}
catch (Exception ex)
{