< Summary - Syki

Information
Class: Syki.Back.Features.Academic.GetWebhookCall.GetWebhookCallService
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/GetWebhookCall/GetWebhookCallService.cs
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 21
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
Get()0%620%

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/GetWebhookCall/GetWebhookCallService.cs

#LineLine coverage
 1namespace Syki.Back.Features.Academic.GetWebhookCall;
 2
 03public class GetWebhookCallService(SykiDbContext ctx) : IAcademicService
 4{
 5    public async Task<OneOf<GetWebhookCallFullOut, SykiError>> Get(Guid institutionId, Guid id)
 6    {
 07        var webhookCall = await ctx.WebhookCalls.AsNoTracking()
 08            .Include(w => w.Attempts)
 09            .Where(w => w.InstitutionId == institutionId && w.Id == id)
 010            .FirstOrDefaultAsync();
 11
 012        if (webhookCall is null) return new WebhookCallNotFound();
 13
 014        var webhookName = await ctx.Webhooks
 015            .Where(w => w.InstitutionId == institutionId && w.Id == webhookCall.WebhookId)
 016            .Select(w => w.Name)
 017            .FirstOrDefaultAsync();
 18
 019        return webhookCall.ToGetWebhookCallFullOut(webhookName);
 020    }
 21}