|
@@ -70,6 +70,19 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
return response;
|
|
|
|
|
|
|
|
|
+ }
|
|
|
+ /// <summary>
|
|
|
+ /// 数据推送接口
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="req"></param>
|
|
|
+ /// <param name="log"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [Function("lesson-tag-change")]
|
|
|
+ public async Task<HttpResponseData> LessonTagChange([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequestData req) {
|
|
|
+ var response = req.CreateResponse(HttpStatusCode.OK);
|
|
|
+ string data = await new StreamReader(req.Body).ReadToEndAsync();
|
|
|
+ var json = JsonDocument.Parse(data).RootElement;
|
|
|
+ return response;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 数据推送接口
|
|
@@ -83,7 +96,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
var response = req.CreateResponse(HttpStatusCode.OK);
|
|
|
string data = await new StreamReader(req.Body).ReadToEndAsync();
|
|
|
var json = JsonDocument.Parse(data).RootElement;
|
|
|
- List<OldNew> old_new = null;
|
|
|
+ List<KnowledgeOldNew> old_new = null;
|
|
|
string school = null;
|
|
|
if (json.TryGetProperty("school", out JsonElement _school))
|
|
|
{
|
|
@@ -91,7 +104,7 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
|
|
|
}
|
|
|
if (json.TryGetProperty("old_new", out JsonElement _old_new))
|
|
|
{
|
|
|
- old_new = _old_new.ToObject<List<OldNew>>();
|
|
|
+ old_new = _old_new.ToObject<List<KnowledgeOldNew>>();
|
|
|
}
|
|
|
if (old_new.IsNotEmpty() && !string.IsNullOrWhiteSpace(school))
|
|
|
{
|