From 388792b916fdba7b0200d04e7d12ca8f22e33fcc Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Thu, 26 May 2022 19:07:29 -0500 Subject: move rescan share function, implement share summary --- src/slskd/Core/API/Controllers/ApplicationController.cs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/slskd/Core/API/Controllers/ApplicationController.cs') diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs index cd03d96f..3cf3c0a3 100644 --- a/src/slskd/Core/API/Controllers/ApplicationController.cs +++ b/src/slskd/Core/API/Controllers/ApplicationController.cs @@ -136,20 +136,5 @@ namespace slskd.Core.API return Ok(); } - - [HttpPut] - [Route("shares")] - [Authorize] - public IActionResult RescanSharesAsync() - { - if (ApplicationStateMonitor.CurrentValue.SharedFileCache.Filling) - { - return Conflict("A share scan is already in progress."); - } - - _ = Application.RescanSharesAsync(); - - return Ok(); - } } } -- cgit v1.2.3 From d52ec889fcf717014e7b29359e56ff15eabd0077 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 20 Jul 2022 20:41:02 -0500 Subject: add endpoint for memory dumps --- src/slskd/Core/API/Controllers/ApplicationController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/slskd/Core/API/Controllers/ApplicationController.cs') diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs index 3cf3c0a3..ac8be802 100644 --- a/src/slskd/Core/API/Controllers/ApplicationController.cs +++ b/src/slskd/Core/API/Controllers/ApplicationController.cs @@ -136,5 +136,15 @@ namespace slskd.Core.API return Ok(); } + + [HttpGet("dump")] + [Authorize] + public async Task DumpMemory() + { + using var dumper = new Dumper(); + var file = await dumper.DumpAsync(); + + return PhysicalFile(file, "application/octet-stream", "slskd.dmp"); + } } } -- cgit v1.2.3