< Summary - Syki

Information
Class: Syki.Back.Features.Academic.ReprocessWebhookCall.ReprocessWebhookCallService
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/ReprocessWebhookCall/ReprocessWebhookCallService.cs
Tag: 4_16869239191
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 17
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%
Reprocess()0%620%

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/ReprocessWebhookCall/ReprocessWebhookCallService.cs

#LineLine coverage
 1using Syki.Back.Features.Academic.CallWebhooks;
 2
 3namespace Syki.Back.Features.Academic.ReprocessWebhookCall;
 4
 05public class ReprocessWebhookCallService(SykiDbContext ctx) : IAcademicService
 6{
 7    public async Task<OneOf<SykiSuccess, SykiError>> Reprocess(Guid institutionId, Guid id)
 8    {
 09        var call = await ctx.WebhookCalls.AsNoTracking().FirstOrDefaultAsync(x => x.Id == id);
 010        if (call is null) return new WebhookCallNotFound();
 11
 012        ctx.AddCommand(institutionId, new CallWebhookCommand(call.Id));
 013        await ctx.SaveChangesAsync();
 14
 015        return new SykiSuccess();
 016    }
 17}