mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 08:11:10 +00:00
Adds media libraries management table
This commit is contained in:
1 parent
44218a690a
commit
c37f4ab7c2
15 files changed
+1516
-117
No files matched your search
+12
@@ -2,6 +2,7 @@
|
||||
using Lumina.Presentation.Web.Common.Api;
|
||||
using Lumina.Presentation.Web.Common.Attributes;
|
||||
using Lumina.Presentation.Web.Common.Enums.Authorization;
|
||||
using Lumina.Presentation.Web.Common.Models.Common;
|
||||
using Lumina.Presentation.Web.Common.Models.Libraries;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -112,4 +113,15 @@ public class LibraryManagementController : Controller
|
||||
await _apiHttpClient.DeleteAsync($"libraries/{id}", cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initiates the scan of all media libraries.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpPost("api-scan-libraries")]
|
||||
public async Task<IActionResult> ScanAllLibraries(CancellationToken cancellationToken = default)
|
||||
{
|
||||
await _apiHttpClient.PostAsync<EmptyModel, EmptyModel>($"libraries/scan", new EmptyModel(), cancellationToken).ConfigureAwait(false);
|
||||
return Json(new { success = true, data = true });
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user