diff --git a/Core/Pgan.PoracleWebNet.Core.Abstractions/Repositories/IHumanRepository.cs b/Core/Pgan.PoracleWebNet.Core.Abstractions/Repositories/IHumanRepository.cs index 3f067da5..e670d89a 100644 --- a/Core/Pgan.PoracleWebNet.Core.Abstractions/Repositories/IHumanRepository.cs +++ b/Core/Pgan.PoracleWebNet.Core.Abstractions/Repositories/IHumanRepository.cs @@ -8,7 +8,6 @@ public interface IHumanRepository /// The webhook humans, id and name. Used to resolve a delegated webhook named by name. public Task> GetWebhooksAsync(); - public Task GetByIdAsync(string id); public Task> GetByIdsAsync(IEnumerable ids); public Task ExistsAsync(string id); public Task DeleteUserAsync(string userId); diff --git a/Core/Pgan.PoracleWebNet.Core.Repositories/HumanRepository.cs b/Core/Pgan.PoracleWebNet.Core.Repositories/HumanRepository.cs index 0f5b93c6..9bbfcdb2 100644 --- a/Core/Pgan.PoracleWebNet.Core.Repositories/HumanRepository.cs +++ b/Core/Pgan.PoracleWebNet.Core.Repositories/HumanRepository.cs @@ -23,12 +23,6 @@ public async Task> GetWebhooksAsync() return entities.Select(e => e.ToModel()); } - public async Task GetByIdAsync(string id) - { - var entity = await this._context.Humans.FirstOrDefaultAsync(h => h.Id == id); - return entity is null ? null : entity.ToModel(); - } - public async Task> GetByIdsAsync(IEnumerable ids) { var idArray = ids.ToArray(); diff --git a/Core/Pgan.PoracleWebNet.Core.Services/UserPurgeService.cs b/Core/Pgan.PoracleWebNet.Core.Services/UserPurgeService.cs index 0cc0fc96..4dc67043 100644 --- a/Core/Pgan.PoracleWebNet.Core.Services/UserPurgeService.cs +++ b/Core/Pgan.PoracleWebNet.Core.Services/UserPurgeService.cs @@ -26,6 +26,11 @@ public partial class UserPurgeService( public async Task PurgeAsync(string userId) { + // Deliberately the DATABASE, not IHumanService.ExistsAsync, which is otherwise identical and + // already injected here. That one reads through the proxy, and the proxy answers null for any + // non-success -- so a Poracle that is merely unreachable is indistinguishable from an account + // that does not exist, and this method would answer false. The caller turns false into 404, so + // an outage would tell an admin the account they are deleting is already gone. if (!await this._humanRepository.ExistsAsync(userId)) { return false;