check workflow

This commit is contained in:
kittapath 2024-10-22 08:20:33 +07:00
parent 835b0ce337
commit 4bec812d25
33 changed files with 455 additions and 267 deletions

View file

@ -9,6 +9,7 @@ using Newtonsoft.Json;
using System.Net.Http.Headers;
using Microsoft.Extensions.Configuration;
using System.Security.Claims;
using System.Net.Http.Json;
namespace BMA.EHR.Application.Repositories
{
@ -70,6 +71,39 @@ namespace BMA.EHR.Application.Repositories
}
}
public async Task<dynamic> GetPermissionAPIWorkflowAsync(string refId, string sysName)
{
try
{
var apiPath = $"{_configuration["API"]}/org/workflow/keycloak/isofficer";
using (var client = new HttpClient())
{
var res = await client.PostAsJsonAsync(apiPath, new
{
data = new
{
refId = refId,
sysName = sysName,
},
});
var result = await res.Content.ReadAsStringAsync();
if (res.IsSuccessStatusCode)
{
return true;
}
else
{
return false;
}
}
}
catch
{
throw;
}
}
#endregion
}
}