แก้ api noti ที่อ่านแล้ว

This commit is contained in:
Kittapath 2024-01-18 19:12:40 +07:00
parent 33526755ac
commit 1c1347bb93
2 changed files with 73 additions and 16 deletions

View file

@ -134,6 +134,31 @@ namespace BMA.EHR.Command.Service.Controllers
}
}
/// <summary>
/// แสดงข้อมูล Notification ของ user ที่ Login ที่ยังไม่ได้อ่าน
/// </summary>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("my-notifications/noread")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetMyNotificationAsyncNoread()
{
try
{
var noti = await _notificationRepository.GetMyNotificationAsyncNoread();
return Success(noti);
}
catch
{
throw;
}
}
/// <summary>
/// ลบข้อมูล Notification ของ user ที่ Login
/// </summary>