Implement issue reporting and workflows
This commit is contained in:
1 parent
6ad3d5bbaa
commit
b80ec57589
23 files changed
+1407
-17
No files matched your search
@@ -1,5 +1,7 @@
|
||||
using Helpdesk.Application.Abstractions;
|
||||
using Helpdesk.Application.Issues;
|
||||
using Helpdesk.Application.Users;
|
||||
using Helpdesk.Api.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
@@ -10,7 +12,7 @@ namespace Helpdesk.Api.Controllers;
|
||||
[Authorize]
|
||||
[Route("api/users")]
|
||||
[Produces("application/json")]
|
||||
public sealed class UsersController(UserService users, ICurrentUser currentUser) : ControllerBase
|
||||
public sealed class UsersController(UserService users, ICurrentUser currentUser, IssueService issues) : ControllerBase
|
||||
{
|
||||
/// <summary>Můj profil.</summary>
|
||||
[HttpGet("me")]
|
||||
@@ -21,4 +23,11 @@ public sealed class UsersController(UserService users, ICurrentUser currentUser)
|
||||
[ProducesResponseType<UserDto>(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType<ValidationProblemDetails>(StatusCodes.Status400BadRequest)]
|
||||
public Task<UserDto> UpdateMe(UpdateProfileRequest request, CancellationToken ct) => users.UpdateMeAsync(currentUser, request, ct);
|
||||
|
||||
/// <summary>Aktivní řešitelé s počtem otevřených závad.</summary>
|
||||
[HttpGet("assignable")]
|
||||
[Authorize(Roles = Roles.Management)]
|
||||
[ResponseCache(NoStore = true, Location = ResponseCacheLocation.None)]
|
||||
[ProducesResponseType<ProblemDetails>(StatusCodes.Status403Forbidden)]
|
||||
public Task<IReadOnlyList<AssignableUserDto>> GetAssignable(CancellationToken ct) => issues.GetAssignableAsync(ct);
|
||||
}
|
||||
Reference in new issue
Block a user