xf 1 년 전
부모
커밋
e2bd69a76e
2개의 변경된 파일1개의 추가작업 그리고 27개의 파일을 삭제
  1. 0 10
      src/Hotline.Api/Controllers/FileController.cs
  2. 1 17
      src/Hotline.Api/Controllers/TestController.cs

+ 0 - 10
src/Hotline.Api/Controllers/FileController.cs

@@ -148,21 +148,11 @@ namespace Hotline.Api.Controllers
         [HttpGet("download-proxy")]
         public async Task<IActionResult> DownloadProxy([FromServices] IHttpClientFactory clientFactory, string path)
         {
-            try
-            {
-                _logger.LogInformation($"request file path: {path}");
                 using var client = clientFactory.CreateClient();
                 var responseMessage = await client.GetAsync(path, HttpContext.RequestAborted);
                 responseMessage.EnsureSuccessStatusCode();
                 var stream = await responseMessage.Content.ReadAsStreamAsync(HttpContext.RequestAborted);
                 return File(stream, responseMessage?.Content?.Headers?.ContentType?.MediaType);
-            }
-            catch (Exception e)
-            {
-                Console.WriteLine(e);
-                throw;
-            }
-            
         }
     }
 }

+ 1 - 17
src/Hotline.Api/Controllers/TestController.cs

@@ -337,21 +337,5 @@ public class TestController : BaseController
         var publicKey = keyList[1];
         return $"{publicKey} \r\n {privateKey}";
     }
-
-    [HttpGet("dl")]
-    [AllowAnonymous]
-    public async Task F([FromServices] IRepository<TrCallRecord> callRepository)
-    {
-        var calls = await callRepository.Queryable()
-            .Where(d=> !string.IsNullOrEmpty( d.RecordingFileUrl))
-            .ToListAsync(HttpContext.RequestAborted);
-        foreach (var call in calls)
-        {
-            var uri = new Uri(call.RecordingFileUrl);
-            call.RecordingBaseAddress = $"{uri.Scheme}://{uri.Host}:{uri.Port}";
-            call.RecordingAbsolutePath = uri.AbsolutePath;
-        }
-
-        await callRepository.UpdateRangeAsync(calls, HttpContext.RequestAborted);
-    }
+    
 }