Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running Details

IRC_NewDev
he 2024-09-27 17:12:34 +08:00
commit cd9f7f8812
2 changed files with 5 additions and 5 deletions

View File

@ -324,7 +324,7 @@ namespace IRaCIS.Api.Controllers
public async Task<IResponseOutput> GetObjectStoreTokenAsync([FromServices] IOptionsMonitor<ObjectStoreServiceOptions> options, [FromServices] IOSSService _oSSService)
{
var result = await _oSSService.GetObjectStoreTempToken();
var result = _oSSService.GetObjectStoreTempToken();
result.AWS = await GetAWSTemToken(options.CurrentValue);

View File

@ -145,7 +145,7 @@ public interface IOSSService
public Task DeleteFromPrefix(string prefix);
public Task<ObjectStoreDTO> GetObjectStoreTempToken();
public ObjectStoreDTO GetObjectStoreTempToken();
}
@ -162,7 +162,7 @@ public class OSSService : IOSSService
{
ObjectStoreServiceOptions = options.CurrentValue;
GetObjectStoreTempToken().GetAwaiter().GetResult();
GetObjectStoreTempToken();
}
/// <summary>
@ -663,7 +663,7 @@ public class OSSService : IOSSService
public async Task<ObjectStoreDTO> GetObjectStoreTempToken()
public ObjectStoreDTO GetObjectStoreTempToken()
{
var ossOptions = ObjectStoreServiceOptions.AliyunOSS;
@ -732,7 +732,7 @@ public class OSSService : IOSSService
DurationSeconds = awsOptions.DurationSeconds // 临时凭证有效期
};
var assumeRoleResponse = await stsClient.AssumeRoleAsync(assumeRoleRequest);
var assumeRoleResponse = stsClient.AssumeRoleAsync(assumeRoleRequest).Result;
var credentials = assumeRoleResponse.Credentials;