Add controllers for the Get method #9

Merged
Wesser merged 33 commits from feat/controller-get into release/v1.0.0 2024-02-19 12:06:31 +03:00
2 changed files with 3 additions and 6 deletions
Showing only changes of commit 2b4065bbdf - Show all commits

View File

@ -19,7 +19,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
/// <returns>Basic information about campuses.</returns>
[HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<ActionResult<List<CampusBasicInfoResponse>>> GetBasicInfo()
public async Task<ActionResult<List<CampusBasicInfoResponse>>> Get()
{
var result = await mediator.Send(new GetCampusBasicInfoListQuery());

View File

@ -23,9 +23,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
[HttpGet]
[ProducesResponseType(StatusCodes.Status200OK)]
[BadRequestResponse]
public async Task<ActionResult<List<FacultyResponse>>> Get(
[SwaggerDefault("0")][SwaggerSchema(Nullable = true)][FromQuery] int? page,
[SwaggerDefault("25")][SwaggerSchema(Nullable = true)][FromQuery] int? pageSize)
public async Task<ActionResult<List<FacultyResponse>>> Get([FromQuery] int? page, [FromQuery] int? pageSize)
{
var result = await mediator.Send(new GetFacultyListQuery()
{
@ -52,8 +50,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
[ProducesResponseType(StatusCodes.Status200OK)]
[BadRequestResponse]
[NotFoundResponse]
public async Task<ActionResult<FacultyDetailsResponse>> GetDetails(
[SwaggerDefault("1")] int id)
public async Task<ActionResult<FacultyDetailsResponse>> GetDetails(int id)
{
var result = await mediator.Send(new GetFacultyInfoQuery()
{