2024-03-30 15:10:36 +03:30
|
|
|
|
using Back.Services;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Shared.DTOs;
|
|
|
|
|
|
|
|
|
|
namespace Back.Controllers
|
|
|
|
|
{
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
[ApiController]
|
|
|
|
|
public class BaseController : ControllerBase
|
|
|
|
|
{
|
|
|
|
|
private readonly ServBase _sBase;
|
|
|
|
|
public BaseController(ServBase sBase)
|
|
|
|
|
{
|
|
|
|
|
_sBase = sBase;
|
|
|
|
|
}
|
2024-03-31 01:33:17 +03:30
|
|
|
|
[HttpGet("Pricing")]
|
|
|
|
|
public async Task<ActionResult<List<BasePriceDto>>> Pricing()
|
2024-03-30 15:10:36 +03:30
|
|
|
|
=> Ok(await _sBase.GetBasePrice());
|
2024-03-31 01:33:17 +03:30
|
|
|
|
[HttpGet("DateTimeServer")]
|
|
|
|
|
public async Task<ActionResult<DateTime>> DateTimeServer()
|
|
|
|
|
=> Ok(DateTime.Now);
|
|
|
|
|
[HttpGet("LastBlog/{Count}")]
|
|
|
|
|
public async Task<ActionResult<List<BlogDto>>> LastBlog(int Count)
|
|
|
|
|
=> Ok(await _sBase.GetBlog(Count));
|
2024-03-30 15:10:36 +03:30
|
|
|
|
}
|
|
|
|
|
}
|