เพิ่ม paging noti

This commit is contained in:
Kittapath 2024-01-17 16:39:47 +07:00
parent c6619f1253
commit 73ece9ee40
3 changed files with 20 additions and 12 deletions

View file

@ -45,11 +45,11 @@ namespace BMA.EHR.Command.Service.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetMyInboxAsync()
public async Task<ActionResult<ResponseObject>> GetMyInboxAsync(int page = 1, int pageSize = 20)
{
try
{
var inboxes = await _inboxRepository.GetMyInboxAsync();
var inboxes = await _inboxRepository.GetMyInboxAsync(page, pageSize);
return Success(inboxes);
}
@ -120,11 +120,11 @@ namespace BMA.EHR.Command.Service.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetMyNotificationAsync()
public async Task<ActionResult<ResponseObject>> GetMyNotificationAsync(int page = 1, int pageSize = 20)
{
try
{
var noti = await _notificationRepository.GetMyNotificationAsync();
var noti = await _notificationRepository.GetMyNotificationAsync(page, pageSize);
return Success(noti);
}