feat: add ci
This commit is contained in:
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using mws.backend.dotnet.application.Common;
|
||||
using mws.backend.dotnet.application.Projects;
|
||||
using mws.backend.dotnet.domain.Projects;
|
||||
|
||||
namespace mws.backend.dotnet.api.Controllers;
|
||||
|
||||
@@ -12,9 +13,13 @@ namespace mws.backend.dotnet.api.Controllers;
|
||||
public class ProjectsController(ISender sender) : ControllerBase
|
||||
{
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<PagedResult<ProjectDto>>> GetAll([FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||
public async Task<ActionResult<PagedResult<ProjectDto>>> GetAll(
|
||||
[FromQuery] string? q, [FromQuery] ProjectStatus? status,
|
||||
[FromQuery] string? createdBy, [FromQuery] string? updatedBy,
|
||||
[FromQuery] int page = 1, [FromQuery] int pageSize = 20, CancellationToken ct = default)
|
||||
{
|
||||
return Ok(await sender.Send(new GetProjectsQuery(User.GetUserId(), page, pageSize), ct));
|
||||
var filter = new ProjectListFilter(User.GetUserId(), q, status, createdBy, updatedBy);
|
||||
return Ok(await sender.Send(new GetProjectsQuery(filter, page, pageSize), ct));
|
||||
}
|
||||
|
||||
[HttpGet("search")]
|
||||
|
||||
Reference in New Issue
Block a user