Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public interface IHumanRepository

/// <summary>The webhook humans, id and name. Used to resolve a delegated webhook named by name.</summary>
public Task<IEnumerable<Human>> GetWebhooksAsync();
public Task<Human?> GetByIdAsync(string id);
public Task<IEnumerable<Human>> GetByIdsAsync(IEnumerable<string> ids);
public Task<bool> ExistsAsync(string id);
public Task<bool> DeleteUserAsync(string userId);
Expand Down
6 changes: 0 additions & 6 deletions Core/Pgan.PoracleWebNet.Core.Repositories/HumanRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ public async Task<IEnumerable<Human>> GetWebhooksAsync()
return entities.Select(e => e.ToModel());
}

public async Task<Human?> GetByIdAsync(string id)
{
var entity = await this._context.Humans.FirstOrDefaultAsync(h => h.Id == id);
return entity is null ? null : entity.ToModel();
}

public async Task<IEnumerable<Human>> GetByIdsAsync(IEnumerable<string> ids)
{
var idArray = ids.ToArray();
Expand Down
5 changes: 5 additions & 0 deletions Core/Pgan.PoracleWebNet.Core.Services/UserPurgeService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public partial class UserPurgeService(

public async Task<bool> 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;
Expand Down
Loading