api ลบข้อความ noti #1599
All checks were successful
Build & Deploy Placement Service / build (push) Successful in 2m2s
All checks were successful
Build & Deploy Placement Service / build (push) Successful in 2m2s
This commit is contained in:
parent
baf828ac85
commit
f4f56b1c21
2 changed files with 63 additions and 0 deletions
|
|
@ -184,6 +184,31 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบ Notification ทั้งหมดของ user ที่ login (Hard delete)
|
||||
/// </summary>
|
||||
/// <returns>จำนวนรายการที่ถูกลบ</returns>
|
||||
/// <response code="200">เมื่อทำการลบข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpDelete("my-notifications")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PermanentDeleteAllMyNotificationsAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
var affectedRows = await _notificationRepository.DeleteAllMyNotificationsAsync();
|
||||
|
||||
return Success(affectedRows);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue