aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/Controllers/ApplicationController.cs
diff options
context:
space:
mode:
authorLev Gorodetskiy <github@droserasprout.space>2022-09-02 17:50:01 -0300
committerLev Gorodetskiy <github@droserasprout.space>2022-09-02 17:50:01 -0300
commit200bddf616946ab625d31564fc931f48915702e3 (patch)
tree7d720573ff244352c2aee09135cc4b7751e8a495 /src/slskd/Core/API/Controllers/ApplicationController.cs
parent3c4ce3c0ee5a178dd14fab06575acca39a36c6b2 (diff)
parentb2611b3e94b11853f576cffce371f9ed264d4841 (diff)
downloadslskd-200bddf616946ab625d31564fc931f48915702e3.tar.gz
Merge branch 'master' into aux/docs-proofreading
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");
}
}
}