瀏覽代碼

Function 调整

zhouj1203@hotmail.com 4 年之前
父節點
當前提交
5f5223d8ab
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      TEAMModelFunction/TriggerExam.cs

+ 4 - 4
TEAMModelFunction/TriggerExam.cs

@@ -188,8 +188,8 @@ namespace TEAMModelFunction
                                 if (info.scope.Equals("private", StringComparison.OrdinalIgnoreCase))
                                 {                                                                                                        
                                     var stuResponse = await client.GetContainer("TEAMModelOS", "Teacher").ReadItemStreamAsync(cla, new Azure.Cosmos.PartitionKey($"StuList"));
-                                    if (sresponse.Status == 200) {
-                                        using var json = await JsonDocument.ParseAsync(sresponse.ContentStream);
+                                    if (stuResponse.Status == 200) {
+                                        using var json = await JsonDocument.ParseAsync(stuResponse.ContentStream);
                                         StuList stuList = json.ToObject<StuList>();
                                         //result.info.id = stuList.id;
                                         result.info.name = stuList.name;
@@ -220,9 +220,9 @@ namespace TEAMModelFunction
                                 }
                                 else {                                                                                                                                                                                                                       
                                     var stuResponse = await client.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync(cla, new Azure.Cosmos.PartitionKey($"StuList-{info.school}"));
-                                    if (sresponse.Status == 200)
+                                    if (stuResponse.Status == 200)
                                     {
-                                        using var json = await JsonDocument.ParseAsync(sresponse.ContentStream);
+                                        using var json = await JsonDocument.ParseAsync(stuResponse.ContentStream);
                                         StuList stuList = json.ToObject<StuList>();
                                         //result.info.id = stuList.id;
                                         result.info.name = stuList.name;