|
@@ -75,7 +75,8 @@ namespace TEAMModelOS.Controllers
|
|
|
private readonly IPSearcher _searcher;
|
|
|
public IConfiguration _configuration { get; set; }
|
|
|
private readonly IConverter _converter;
|
|
|
- public TestController(IConverter converter, IPSearcher searcher, IOptionsSnapshot<Option> option, CoreAPIHttpService coreAPIHttpService, IHttpClientFactory httpClient, IWebHostEnvironment environment, AzureCosmosFactory azureCosmos, AzureRedisFactory azureRedis, AzureStorageFactory azureStorage, IConfiguration configuration, AzureServiceBusFactory serviceBus, DingDing dingDing)
|
|
|
+ private readonly HttpTrigger _httpTrigger;
|
|
|
+ public TestController(HttpTrigger httpTrigger, IConverter converter, IPSearcher searcher, IOptionsSnapshot<Option> option, CoreAPIHttpService coreAPIHttpService, IHttpClientFactory httpClient, IWebHostEnvironment environment, AzureCosmosFactory azureCosmos, AzureRedisFactory azureRedis, AzureStorageFactory azureStorage, IConfiguration configuration, AzureServiceBusFactory serviceBus, DingDing dingDing)
|
|
|
{
|
|
|
_converter = converter;
|
|
|
_azureCosmos = azureCosmos;
|
|
@@ -88,7 +89,20 @@ namespace TEAMModelOS.Controllers
|
|
|
_option = option.Value;
|
|
|
_coreAPIHttpService = coreAPIHttpService;
|
|
|
_searcher = searcher;
|
|
|
+ _httpTrigger = httpTrigger;
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 测试五育画像数据推送
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="json"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [ProducesDefaultResponseType]
|
|
|
+ [HttpPost("test-upsert-student-portrait")]
|
|
|
+ public async Task<IActionResult> TestUpsertStudentPortrait(JsonElement json) {
|
|
|
+ var data = await _httpTrigger.RequestHttpTrigger(json, _option.Location, "upsert-student-portrait");
|
|
|
+ return Ok(data.json.ToObject<JsonElement>());
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
///
|
|
|
/// </summary>
|