From 74a65a54948188732a1a666115338cc39c586557 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 26 Nov 2021 17:12:52 -0600 Subject: [PATCH] =?UTF-8?q?refactor(dir):=20=E2=99=BB=F0=9F=9A=A7=20don't?= =?UTF-8?q?=20enable=20list=20create=20/=20GET=20changes=20endpoint=20in?= =?UTF-8?q?=20prod=20just=20yet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ChangesController.cs | 6 +++++- .../Controllers/ListsController.cs | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/ChangesController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/ChangesController.cs index e1603f42b..2cd43e23f 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/ChangesController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/ChangesController.cs @@ -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 GetDetails(long id, CancellationToken cancellationTok return CacheGetOrCreateAsync(() => _mediator.Send(new GetChange.Query(id), cancellationToken), id); } } + +#endif diff --git a/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs b/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs index 0b051b456..9cfd08773 100644 --- a/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs +++ b/services/Directory/FilterLists.Directory.Api/Controllers/ListsController.cs @@ -28,6 +28,8 @@ public Task Get(CancellationToken cancellationToken) return CacheGetOrCreateAsync(() => _mediator.Send(new GetLists.Query(), cancellationToken)); } +#if DEBUG + /// /// Creates the FilterList. /// @@ -44,6 +46,8 @@ public async Task Create(CreateList.Command command, Cancellation new { id = response.ChangeId }); } +#endif + /// /// Gets the details of the FilterList. ///