48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using Core.Abstractions.Models;
|
|
using Core.Models;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using WeatherForecast.Models;
|
|
|
|
namespace WeatherForecast.Controllers;
|
|
|
|
#region Response models
|
|
public class GetShopCatalogResponse : ResponseModel {
|
|
|
|
public PaginationModel<ShopItemModel> ShopItemsPagination { get; set; }
|
|
}
|
|
#endregion
|
|
|
|
[AllowAnonymous]
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
public class ShopCatalog : ControllerBase {
|
|
|
|
private readonly ILogger<LoginController> _logger;
|
|
|
|
public ShopCatalog(ILogger<LoginController> logger) {
|
|
_logger = logger;
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="category"></param>
|
|
/// <param name="searchText"></param>
|
|
/// <param name="currentPage"></param>
|
|
/// <param name="itemsPerPage"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public IActionResult Get([FromQuery] Guid? category, [FromQuery] string? searchText, [FromQuery] int currentPage = 1, [FromQuery] int itemsPerPage = 4) {
|
|
var shopItemModel = new ShopItemModel {
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return Ok();
|
|
}
|
|
}
|