mirror of
https://github.com/bitwarden/server
synced 2025-12-12 06:13:43 +00:00
* add metrics endpoint for an organization to return completed and total security tasks * refactor metrics fetch to use sql sproc for efficiency rather than having to pull all security task data * add separate response model for security task metrics endpoint * Pascal Case to match existing implementations * refactor org to organization for consistency with other methods * alter security task endpoint: - remove "count" from variable naming - update sproc naming * remove enablement check * replace orgId with organizationId
22 lines
571 B
C#
22 lines
571 B
C#
namespace Bit.Api.Vault.Models.Response;
|
|
|
|
public class SecurityTaskMetricsResponseModel
|
|
{
|
|
|
|
public SecurityTaskMetricsResponseModel(int completedTasks, int totalTasks)
|
|
{
|
|
CompletedTasks = completedTasks;
|
|
TotalTasks = totalTasks;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Number of tasks that have been completed in the organization.
|
|
/// </summary>
|
|
public int CompletedTasks { get; set; }
|
|
|
|
/// <summary>
|
|
/// Total number of tasks in the organization, regardless of their status.
|
|
/// </summary>
|
|
public int TotalTasks { get; set; }
|
|
}
|