ลบไฟล์หลักฐาน
This commit is contained in:
parent
9cf8135301
commit
5b1f9cc72b
3 changed files with 51 additions and 32 deletions
|
|
@ -752,11 +752,37 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// อัปเอกสารหลักฐาน
|
||||
/// list เอกสารหลักฐาน
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่ออัปเอกสารหลักฐานสำเร็จ</response>
|
||||
/// <response code="200">เมื่อ list เอกสารหลักฐานสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("upload/{examId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> GetFileCandidateService(string examId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var doc = await _candidateService.GetsAsyncFileUpload(examId);
|
||||
|
||||
return Success(doc);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// อัปโหลดเอกสารหลักฐาน
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่ออัปโหลดเอกสารหลักฐานสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("upload/{examId:length(36)}"), DisableRequestSizeLimit]
|
||||
|
|
@ -791,23 +817,22 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
/// <response code="200">เมื่อลบเอกสารหลักฐานสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
// [HttpDelete("upload/{examId:length(36)}"), DisableRequestSizeLimit]
|
||||
// [ProducesResponseType(StatusCodes.Status200OK)]
|
||||
// [ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
// [ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
// public async Task<ActionResult<ResponseObject>> DeleteFileCandidateService(string documentId)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// await _candidateService.DeleteAsyncDocument(documentId);
|
||||
|
||||
// return Success();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// return Error(ex);
|
||||
// }
|
||||
// }
|
||||
[HttpDelete("upload/{examId:length(36)}"), DisableRequestSizeLimit]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> DeleteFileCandidateService(string documentId)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _candidateService.DeleteAsyncDocument(documentId);
|
||||
return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// โหลดไฟล์
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue