case 4377
This commit is contained in:
@@ -198,6 +198,27 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get list of Customer Contacts for workorder
|
||||
/// </summary>
|
||||
/// <param name="id">Customer Id</param>
|
||||
/// <returns>Name list</returns>
|
||||
[HttpGet("contact-name-list/{id}")]
|
||||
public async Task<IActionResult> GetContactNameList([FromRoute] long id)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
CustomerBiz biz = CustomerBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
var o = await biz.GetContactNameListAsync(id);
|
||||
if (o == null) return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
return Ok(ApiOkResponse.Response(o));
|
||||
}
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Get service (physical) address for this customer
|
||||
// /// </summary>
|
||||
|
||||
Reference in New Issue
Block a user