diff --git a/LMS.Common/Dictionary/SimpleOptions.cs b/LMS.Common/Dictionary/SimpleOptions.cs index af94ff7..3834b93 100644 --- a/LMS.Common/Dictionary/SimpleOptions.cs +++ b/LMS.Common/Dictionary/SimpleOptions.cs @@ -1,4 +1,6 @@ -namespace LMS.Common.Dictionary; +using LMS.Common.Enum; + +namespace LMS.Common.Dictionary; public class SimpleOptions { @@ -6,5 +8,6 @@ public class SimpleOptions { { "ttsrole", ["EdgeTTsRoles"] }, { "laitoolinfo", ["LaitoolHomePage", "LaitoolNotice", "LaitoolUpdateContent", "LaitoolVersion"] }, + { OptionKeyName.LaitoolFluxApiModelList, [OptionKeyName.LaitoolFluxApiModelList] } }; } \ No newline at end of file diff --git a/LMS.service/Service/ForwardWordService.cs b/LMS.service/Service/ForwardWordService.cs index 219c22b..4c0183a 100644 --- a/LMS.service/Service/ForwardWordService.cs +++ b/LMS.service/Service/ForwardWordService.cs @@ -199,7 +199,7 @@ public class ForwardWordService(ApplicationDbContext context) var response = await client.PostAsync(request.url, new StringContent(request.dataString, Encoding.UTF8, "application/json")); // 判断返回的状态码 - if (response.StatusCode != HttpStatusCode.OK) + if (response.StatusCode != HttpStatusCode.OK && response.StatusCode != HttpStatusCode.Created) { if (response.StatusCode == HttpStatusCode.Unauthorized) { @@ -254,7 +254,7 @@ public class ForwardWordService(ApplicationDbContext context) client.Timeout = Timeout.InfiniteTimeSpan; var response = await client.GetAsync(getTransferModel.url); // 判断返回的状态码 - if (response.StatusCode != HttpStatusCode.OK) + if (response.StatusCode != HttpStatusCode.OK && response.StatusCode != HttpStatusCode.Created) { // 读取响应体 string responseContent = await response.Content.ReadAsStringAsync();