aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/Controllers/ApplicationController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Core/API/Controllers/ApplicationController.cs')
-rw-r--r--src/slskd/Core/API/Controllers/ApplicationController.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/slskd/Core/API/Controllers/ApplicationController.cs b/src/slskd/Core/API/Controllers/ApplicationController.cs
index cd03d96f..ac8be802 100644
--- a/src/slskd/Core/API/Controllers/ApplicationController.cs
+++ b/src/slskd/Core/API/Controllers/ApplicationController.cs
@@ -137,19 +137,14 @@ namespace slskd.Core.API
return Ok();
}
- [HttpPut]
- [Route("shares")]
+ [HttpGet("dump")]
[Authorize]
- public IActionResult RescanSharesAsync()
+ public async Task<IActionResult> DumpMemory()
{
- if (ApplicationStateMonitor.CurrentValue.SharedFileCache.Filling)
- {
- return Conflict("A share scan is already in progress.");
- }
+ using var dumper = new Dumper();
+ var file = await dumper.DumpAsync();
- _ = Application.RescanSharesAsync();
-
- return Ok();
+ return PhysicalFile(file, "application/octet-stream", "slskd.dmp");
}
}
}