ออกคำสั่งวินัย
This commit is contained in:
parent
7556a6c400
commit
be98975ce0
10 changed files with 17496 additions and 68 deletions
|
|
@ -4608,11 +4608,22 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> ExecuteCommandAsync(Guid orderId)
|
||||
public async Task<ActionResult<ResponseObject>> ExecuteCommandAsync([FromHeader] string authorization, Guid orderId)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _repository.ExecuteCommandAsync(orderId);
|
||||
var token = string.Empty;
|
||||
if (AuthenticationHeaderValue.TryParse(authorization, out var headerValue))
|
||||
{
|
||||
// we have a valid AuthenticationHeaderValue that has the following details:
|
||||
|
||||
var scheme = headerValue.Scheme;
|
||||
token = headerValue.Parameter;
|
||||
|
||||
// scheme will be "Bearer"
|
||||
// parmameter will be the token itself.
|
||||
}
|
||||
await _repository.ExecuteCommandAsync(orderId, token);
|
||||
|
||||
return Success();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue