CrazyIter_Bin 4 月之前
父節點
當前提交
fe99d7e61c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      TEAMModelOS.SDK/Models/Service/Common/TeacherService.cs

+ 2 - 2
TEAMModelOS.SDK/Models/Service/Common/TeacherService.cs

@@ -20,7 +20,7 @@ namespace TEAMModelOS.Services
     public static class TeacherService
     {
         public static async Task<TeacherInfo> TeacherInfoLite(AzureCosmosFactory _azureCosmos, string name, string picture, string id,
-           AzureStorageFactory _azureStorage, Option _option, AzureRedisFactory _azureRedis, string ip, HttpTrigger _httpTrigger, string lang, int timezone, string school = null)
+           AzureStorageFactory _azureStorage, Option _option, AzureRedisFactory _azureRedis, string ip, HttpTrigger _httpTrigger, string lang, int timezone, string schoolCode = null)
         {
             Teacher teacher = null;
             string defaultschool = null;
@@ -180,7 +180,7 @@ namespace TEAMModelOS.Services
             //catch { }
 
             //換取AuthToken,提供給前端
-            var auth_token = JwtAuthExtension.CreateAuthToken(_option.HostName, id, name?.ToString(), picture?.ToString(), _option.JwtSecretKey, Website: "IES", timezone: timezone, scope: Constant.ScopeTeacher,schoolID:!string.IsNullOrWhiteSpace(school)? school: defaultschool, standard:  "", roles: roles.ToArray(), expire: 1);
+            var auth_token = JwtAuthExtension.CreateAuthToken(_option.HostName, id, name?.ToString(), picture?.ToString(), _option.JwtSecretKey, Website: "IES", timezone: timezone, scope: Constant.ScopeTeacher,schoolID:!string.IsNullOrWhiteSpace(schoolCode) ? schoolCode : defaultschool, standard:  "", roles: roles.ToArray(), expire: 1);
 
             //取得Teacher Blob 容器位置及SAS 
             await _azureStorage.GetBlobContainerClient(id).CreateIfNotExistsAsync(PublicAccessType.None); //嘗試創建Teacher私有容器,如存在則不做任何事,保障容器一定存在