mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 07:01:10 +00:00
Adds library saved domnain event and its handler
This commit is contained in:
1 parent
846edac83f
commit
104106d2ec
26 files changed
+475
-28
No files matched your search
+15
-7
@@ -35,16 +35,24 @@ public class LibraryManagementController : Controller
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the view for adding or editing a media library.
|
||||
/// Displays the view for adding a media library.
|
||||
/// </summary>
|
||||
/// <param name="id">The optional id of the media library to edit.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("item/{id?}")]
|
||||
public async Task<IActionResult> EditLibrary(Guid? id = null, CancellationToken cancellationToken = default)
|
||||
[HttpGet("item")]
|
||||
public IActionResult AddLibrary()
|
||||
{
|
||||
LibraryModel libraryModel = new();
|
||||
if (id is not null)
|
||||
libraryModel = await _apiHttpClient.GetAsync<LibraryModel>($"libraries/{id}", cancellationToken).ConfigureAwait(false);
|
||||
return View("/Views/Library/Management/Item.cshtml", libraryModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the view for editing a media library.
|
||||
/// </summary>
|
||||
/// <param name="id">The id of the media library to edit.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
[HttpGet("item/{id}")]
|
||||
public async Task<IActionResult> EditLibrary(Guid id, CancellationToken cancellationToken = default)
|
||||
{
|
||||
LibraryModel libraryModel = await _apiHttpClient.GetAsync<LibraryModel>($"libraries/{id}", cancellationToken).ConfigureAwait(false);
|
||||
return View("/Views/Library/Management/Item.cshtml", libraryModel);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user