< Summary

Information
Class: Elsa.Tenants.Endpoints.Tenants.Refresh.Endpoint
Assembly: Elsa.Tenants
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Endpoints/Tenants/Refresh/Endpoint.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 20
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
Configure()100%210%
HandleAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Tenants/Endpoints/Tenants/Refresh/Endpoint.cs

#LineLine coverage
 1using Elsa.Authorization;
 2using Elsa.Abstractions;
 3using Elsa.Common.Multitenancy;
 4
 5namespace Elsa.Tenants.Endpoints.Tenants.Refresh;
 6
 07public class Endpoint(ITenantService tenantService) : ElsaEndpointWithoutRequest
 8{
 9    public override void Configure()
 10    {
 011        Post("/tenants/refresh");
 012        RequirePermission(Elsa.Tenants.Permissions.TenantPermissions.Tenants, "refresh");
 013    }
 14
 15    public override async Task HandleAsync(CancellationToken ct)
 16    {
 017        await tenantService.RefreshAsync(ct);
 018        await Send.OkAsync(cancellation: ct);
 019    }
 20}