...
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user