change recruit controller

This commit is contained in:
Suphonchai Phoonsawat 2023-03-31 16:12:19 +07:00
parent 27a3b1e771
commit 28a59edd3b
4 changed files with 27 additions and 1 deletions

Binary file not shown.

View file

@ -138,7 +138,7 @@ namespace BMA.EHR.Recruit.Service.Controllers
/// ตัวอย่างในการเขียน api เพื่อทำการ upload file
/// </summary>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="200">เมื่อทำการ upload สำเร็จ</response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
@ -168,7 +168,20 @@ namespace BMA.EHR.Recruit.Service.Controllers
}
}
/// <summary>
/// ตัวอย่างในการเขียน api เพื่อทำการ delete file
/// </summary>
/// <param name="id">รหัสไฟล์ในฐานข้อมูล</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการ delete file สำเร็จ</response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("delete/{id:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[AllowAnonymous]
public async Task<ActionResult<ResponseObject>> DeleteFile(Guid id)
{
@ -184,7 +197,20 @@ namespace BMA.EHR.Recruit.Service.Controllers
}
}
/// <summary>
/// ตัวอย่างในการเขียน api เพื่อทำการ download file
/// </summary>
/// <param name="id">รหัสไฟล์ในฐานข้อมูล</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการ download file สำเร็จ</response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("download/{id:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
[AllowAnonymous]
public async Task<ActionResult<ResponseObject>> DownloadFile(Guid id)
{