Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
mlapaglia committed Jan 29, 2024
1 parent faee6fa commit 08fff09
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ await _alertClient.SendAlertAsync(new AlertUpdateRequest()
IsUrgent = true,
PlateId = testPlateGroup.Id,
PlateJpeg = testPlateGroup.PlateImage.Jpeg,
PlateJpegUrl = $"/images/crop/{testPlateGroup.OpenAlprUuid}",
PlateJpegUrl = $"/api/images/crop/{testPlateGroup.OpenAlprUuid}",
PlateNumber = testPlateGroup.BestNumber,
ReceivedOn = DateTimeOffset.UtcNow,
}, cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ await _alertClient.SendAlertAsync(new AlertUpdateRequest()
PlateId = testPlateGroup.Id,
PlateNumber = testPlateGroup.BestNumber,
PlateJpeg = testPlateGroup.PlateImage.Jpeg,
PlateJpegUrl = $"/images/crop/{testPlateGroup.OpenAlprUuid}",
PlateJpegUrl = $"/api/images/crop/{testPlateGroup.OpenAlprUuid}",
ReceivedOn = DateTimeOffset.UtcNow,
}, cancellationToken);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private async Task<string> CreateSampleImageUrlAsync(
}
}

private DateTimeOffset? GetNextScheduledExecutionDate(
private static DateTimeOffset? GetNextScheduledExecutionDate(
Agent agent,
Data.Camera camera,
JobDetailsDto dateToEnqueueAt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async Task<List<string>> HandleAsync(
.Take(10)
.ToListAsync(cancellationToken);

return capturedPlates.Select(x => Flurl.Url.Combine($"/images/{x}")).ToList();
return capturedPlates.Select(x => Flurl.Url.Combine($"/api/images/{x}")).ToList();
}
}
}
4 changes: 2 additions & 2 deletions OpenAlprWebhookProcessor.Server/LicensePlates/PlateMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public static LicensePlate MapPlate(
{
AlertDescription = plate.AlertDescription,
Direction = plate.Direction,
ImageUrl = new Uri($"/images/{plate.OpenAlprUuid}", UriKind.Relative),
ImageUrl = new Uri($"/api/images/{plate.OpenAlprUuid}", UriKind.Relative),
CanBeEnriched = !plate.IsEnriched,
CropImageUrl = new Uri($"/images/crop/{plate.OpenAlprUuid}", UriKind.Relative),
CropImageUrl = new Uri($"/api/images/crop/{plate.OpenAlprUuid}", UriKind.Relative),
Id = plate.Id,
IsAlert = platesToAlert?.Contains(plate.BestNumber) ?? false,
IsIgnore = platesToIgnore?.Contains(plate.BestNumber) ?? false,
Expand Down
4 changes: 1 addition & 3 deletions OpenAlprWebhookProcessor.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMemoryCache();
}

public void Configure(
IApplicationBuilder app,
IWebHostEnvironment env)
public void Configure(IApplicationBuilder app)
{
app.UseSerilogRequestLogging();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public async Task HandleWebhookAsync(
IsUrgent = true,
PlateId = plateGroup.Id,
PlateJpeg = plateJpeg,
PlateJpegUrl = $"/images/crop/{plateGroup.OpenAlprUuid}",
PlateJpegUrl = $"/api/images/crop/{plateGroup.OpenAlprUuid}",
PlateNumber = alert.PlateNumber,
ReceivedOn = receivedOn,
};
Expand All @@ -199,7 +199,7 @@ public async Task HandleWebhookAsync(
IsUrgent = false,
PlateId = plateGroup.Id,
PlateJpeg = plateJpeg,
PlateJpegUrl = $"/images/crop/{plateGroup.OpenAlprUuid}",
PlateJpegUrl = $"/api/images/crop/{plateGroup.OpenAlprUuid}",
PlateNumber = plateGroup.BestNumber,
ReceivedOn = receivedOn,
};
Expand Down

0 comments on commit 08fff09

Please sign in to comment.