This commit is contained in:
mmrbnjd
2024-04-03 14:36:33 +03:30
parent dd4969f504
commit 8e8bffa8a8
10 changed files with 109 additions and 85 deletions

View File

@@ -23,6 +23,14 @@ namespace Back.Controllers
[HttpGet("LastBlog")]
public async Task<ActionResult<PagingDto<BlogDto>>> LastBlog(int PageIndex,int PageSize)
=> Ok(await _sBase.GetBlog(PageIndex,PageSize));
[HttpGet("GetBlogByID/{ID}")]
public async Task<ActionResult<BlogDtoFull?>> GetBlogByID(int ID)
{
var result = await _sBase.GetBlogByID(ID);
if (result == null)
return NotFound();
return Ok(result);
}
}
}