refactor(dir): ♻🚧 don't enable list create / GET changes endpoint in prod just yet

This commit is contained in:
Collin M. Barrett 2021-11-26 17:12:52 -06:00
parent 06559303e9
commit 74a65a5494
2 changed files with 9 additions and 1 deletions

View file

@ -1,4 +1,6 @@
using FilterLists.Directory.Application.Queries;
#if DEBUG
using FilterLists.Directory.Application.Queries;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Caching.Memory;
@ -40,3 +42,5 @@ public Task<IActionResult> GetDetails(long id, CancellationToken cancellationTok
return CacheGetOrCreateAsync(() => _mediator.Send(new GetChange.Query(id), cancellationToken), id);
}
}
#endif

View file

@ -28,6 +28,8 @@ public Task<IActionResult> Get(CancellationToken cancellationToken)
return CacheGetOrCreateAsync(() => _mediator.Send(new GetLists.Query(), cancellationToken));
}
#if DEBUG
/// <summary>
/// Creates the FilterList.
/// </summary>
@ -44,6 +46,8 @@ public async Task<IActionResult> Create(CreateList.Command command, Cancellation
new { id = response.ChangeId });
}
#endif
/// <summary>
/// Gets the details of the FilterList.
/// </summary>