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:
@@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user