This commit is contained in:
@@ -91,30 +91,30 @@ namespace AyaNova.Api.Controllers
|
|||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
// /// <summary>
|
||||||
/// Get Client app relevant GlobalOpsBackupSettings
|
// /// Get Client app relevant GlobalOpsBackupSettings
|
||||||
/// </summary>
|
// /// </summary>
|
||||||
/// <returns>Global ops backup settings object</returns>
|
// /// <returns>Global ops backup settings object</returns>
|
||||||
[HttpGet("client")]
|
// [HttpGet("client")]
|
||||||
public async Task<ActionResult> GetClientGlobalOpsBackupSettings()
|
// public async Task<ActionResult> GetClientGlobalOpsBackupSettings()
|
||||||
{
|
// {
|
||||||
//NOTE: currently this looks like a dupe of get above and it is
|
// //NOTE: currently this looks like a dupe of get above and it is
|
||||||
//but it's kept here in case want to return a subset of the settings only to client users
|
// //but it's kept here in case want to return a subset of the settings only to client users
|
||||||
//where some internal server only stuff might not be desired to send to user
|
// //where some internal server only stuff might not be desired to send to user
|
||||||
|
|
||||||
if (serverState.IsClosed)
|
// if (serverState.IsClosed)
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
GlobalOpsBackupSettingsBiz biz = GlobalOpsBackupSettingsBiz.GetBiz(ct, HttpContext);
|
// GlobalOpsBackupSettingsBiz biz = GlobalOpsBackupSettingsBiz.GetBiz(ct, HttpContext);
|
||||||
//this route is available to Ops role user only
|
// //this route is available to Ops role user only
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
// if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
if (!ModelState.IsValid)
|
// if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
// return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
var o = await biz.GetAsync();
|
// var o = await biz.GetAsync();
|
||||||
if (o == null)
|
// if (o == null)
|
||||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
// return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||||
return Ok(ApiOkResponse.Response(o));
|
// return Ok(ApiOkResponse.Response(o));
|
||||||
}
|
// }
|
||||||
|
|
||||||
}//eoc
|
}//eoc
|
||||||
}//ens
|
}//ens
|
||||||
Reference in New Issue
Block a user