DigiKam4 Archive
Change to only need the one json file and changed AppSettings to not need a binder file Editorconfig for no new line before open braces Nuget package bumps Database lowest-version-history
This commit is contained in:
@ -1,27 +1,27 @@
|
||||
using ImmichToSlideshow.Services;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace ImmichToSlideshow.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("api/v1/[controller]")]
|
||||
public class AssetsController(AssetService assetService) : ControllerBase
|
||||
{
|
||||
public class AssetsController(AssetService assetService) : ControllerBase {
|
||||
|
||||
private readonly string _ContentType = "application/json";
|
||||
private readonly AssetService _AssetService = assetService;
|
||||
|
||||
[HttpGet("columns")]
|
||||
public IActionResult GetColumns() =>
|
||||
Content(_AssetService.GetColumns(), _ContentType);
|
||||
Content(_AssetService.GetColumns() ?? string.Empty, _ContentType);
|
||||
|
||||
[HttpGet("owner-ids")]
|
||||
public IActionResult GetOwnerIds() =>
|
||||
Content(_AssetService.GetOwnerIds(), _ContentType);
|
||||
Content(_AssetService.GetOwnerIds() ?? string.Empty, _ContentType);
|
||||
|
||||
[HttpGet("{ownerId:guid}")]
|
||||
public IActionResult Get(Guid ownerId) =>
|
||||
Content(_AssetService.GetAssets(ownerId), _ContentType);
|
||||
Content(_AssetService.GetAssets(ownerId) ?? string.Empty, _ContentType);
|
||||
|
||||
[HttpGet("{ownerId:guid}/random-paths")]
|
||||
public IActionResult GetRandomPaths(Guid ownerId) =>
|
||||
@ -29,11 +29,11 @@ public class AssetsController(AssetService assetService) : ControllerBase
|
||||
|
||||
[HttpGet("{ownerId:guid}/archived-tag")]
|
||||
public IActionResult GetArchivedTag(Guid ownerId) =>
|
||||
Content(_AssetService.GetArchivedTag(ownerId), _ContentType);
|
||||
Content(_AssetService.GetArchivedTag(ownerId) ?? string.Empty, _ContentType);
|
||||
|
||||
[HttpGet("{ownerId:guid}/save-random-paths")]
|
||||
public IActionResult SaveRandomPaths(Guid ownerId) =>
|
||||
Content(_AssetService.SaveRandomPaths(ownerId), _ContentType);
|
||||
Content(_AssetService.SaveRandomPaths(ownerId) ?? string.Empty, _ContentType);
|
||||
|
||||
[HttpGet("{ownerId:guid}/sync-immich")]
|
||||
public IActionResult SyncImmich(Guid ownerId) =>
|
||||
@ -43,4 +43,8 @@ public class AssetsController(AssetService assetService) : ControllerBase
|
||||
public IActionResult SetArchiveImmich(Guid ownerId) =>
|
||||
Ok(_AssetService.SetArchiveImmich(ownerId));
|
||||
|
||||
[HttpGet("{ownerId:guid}/set-digi-kam-4-archive-immich")]
|
||||
public IActionResult SetDigiKam4ArchiveImmich(Guid ownerId) =>
|
||||
Ok(_AssetService.SetDigiKam4ArchiveImmich(ownerId));
|
||||
|
||||
}
|
Reference in New Issue
Block a user