1
0
mirror of https://github.com/bitwarden/server synced 2025-12-10 05:13:48 +00:00

[PM-20576] OrganizationReport - Queries and Command (#5983)

This commit is contained in:
Vijay Oommen
2025-06-24 09:13:43 -05:00
committed by GitHub
parent 494c41e3b1
commit 86a4ce5a51
19 changed files with 962 additions and 1 deletions

View File

@@ -32,4 +32,14 @@ public class OrganizationReportRepository : Repository<OrganizationReport, Guid>
return results.ToList();
}
}
public async Task<OrganizationReport> GetLatestByOrganizationIdAsync(Guid organizationId)
{
return await GetByOrganizationIdAsync(organizationId)
.ContinueWith(task =>
{
var reports = task.Result;
return reports.OrderByDescending(r => r.CreationDate).FirstOrDefault();
});
}
}