เพิ่ม workflow

This commit is contained in:
kittapath 2024-10-18 09:48:08 +07:00
parent f8f63e312f
commit a583dc7c42
2 changed files with 35 additions and 16 deletions

View file

@ -508,7 +508,19 @@ namespace BMA.EHR.Retirement.Service.Controllers
true
);
await _context.SaveChangesAsync();
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", ""));
client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]);
var _res = await client.PostAsJsonAsync($"{_configuration["API"]}/org/workflow/add-workflow", new
{
refId = retirementResign.Id,
sysName = "RETIREMENT_RESIFNATION",
posLevelName = retirementResign.PositionLevelOld,
posTypeName = retirementResign.PositionTypeOld,
});
Console.WriteLine(_res);
}
return Success(retirementResign);
}