Add controllers for the Get method #9
@ -19,7 +19,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
|
|||||||
/// <returns>Basic information about campuses.</returns>
|
/// <returns>Basic information about campuses.</returns>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
public async Task<ActionResult<List<CampusBasicInfoResponse>>> GetBasicInfo()
|
public async Task<ActionResult<List<CampusBasicInfoResponse>>> Get()
|
||||||
{
|
{
|
||||||
var result = await mediator.Send(new GetCampusBasicInfoListQuery());
|
var result = await mediator.Send(new GetCampusBasicInfoListQuery());
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
|
|||||||
[HttpGet]
|
[HttpGet]
|
||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[BadRequestResponse]
|
[BadRequestResponse]
|
||||||
public async Task<ActionResult<List<FacultyResponse>>> Get(
|
public async Task<ActionResult<List<FacultyResponse>>> Get([FromQuery] int? page, [FromQuery] int? pageSize)
|
||||||
[SwaggerDefault("0")][SwaggerSchema(Nullable = true)][FromQuery] int? page,
|
|
||||||
[SwaggerDefault("25")][SwaggerSchema(Nullable = true)][FromQuery] int? pageSize)
|
|
||||||
{
|
{
|
||||||
var result = await mediator.Send(new GetFacultyListQuery()
|
var result = await mediator.Send(new GetFacultyListQuery()
|
||||||
{
|
{
|
||||||
@ -52,8 +50,7 @@ namespace Mirea.Api.Endpoint.Controllers.V1
|
|||||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
[BadRequestResponse]
|
[BadRequestResponse]
|
||||||
[NotFoundResponse]
|
[NotFoundResponse]
|
||||||
public async Task<ActionResult<FacultyDetailsResponse>> GetDetails(
|
public async Task<ActionResult<FacultyDetailsResponse>> GetDetails(int id)
|
||||||
[SwaggerDefault("1")] int id)
|
|
||||||
{
|
{
|
||||||
var result = await mediator.Send(new GetFacultyInfoQuery()
|
var result = await mediator.Send(new GetFacultyInfoQuery()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user