Skip to content

Commit

Permalink
Addressed csharpsquid:S2245
Browse files Browse the repository at this point in the history
  • Loading branch information
Atreyu committed Jan 25, 2025
1 parent fa26b17 commit 1b62d17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions InkyCal.Server/Controllers/PanelController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Security.Cryptography;
using System.Threading;
using System.Threading.Tasks;
using InkyCal.Models;
Expand Down Expand Up @@ -123,8 +124,7 @@ public async Task<ActionResult> TestWeather(DisplayModel model, CancellationToke
public async Task<ActionResult> TestNewsPaper(DisplayModel model, CancellationToken cancellationToken, [Range(0, 1200)] int? width = null, [Range(0, 1200)] int? height = null)
{
var newsPapers = (await new Utils.NewPaperRenderer.FreedomForum.ApiClient().GetNewsPapers()).Values.ToArray();

var r = new Random().Next(0, newsPapers.Length);
var r = RandomNumberGenerator.GetInt32(0, newsPapers.Length);
var randomNewsPaper = newsPapers[r];
return await this.Image(new NewsPaperRenderer(randomNewsPaper.PaperId), model, cancellationToken, width, height);
}
Expand Down

0 comments on commit 1b62d17

Please sign in to comment.