Suppressing warning for endpoints #107

Merged
kdeng00 merged 2 commits from program_warning into master 2025-03-01 16:36:02 -05:00
4 changed files with 8 additions and 5 deletions
@@ -136,7 +136,9 @@ public class DirectoryManager : BaseManager
deleted++; deleted++;
} }
curDir = System.IO.Directory.GetParent(curDir).ToString(); var parentDirectory = System.IO.Directory.GetParent(curDir);
curDir = parentDirectory!.ToString();
} }
} }
catch (Exception ex) catch (Exception ex)
@@ -3,7 +3,6 @@ using NLog;
using Icarus.Controllers.Utilities; using Icarus.Controllers.Utilities;
using Icarus.Models; using Icarus.Models;
using Icarus.Database.Contexts; using Icarus.Database.Contexts;
using TagLib.Mpeg4;
namespace Icarus.Controllers.Managers; namespace Icarus.Controllers.Managers;
+3 -3
View File
@@ -219,11 +219,11 @@ public class SongDataController : BaseController
{ {
#region Properties #region Properties
[Newtonsoft.Json.JsonProperty("message")] [Newtonsoft.Json.JsonProperty("message")]
public string Message { get; set; } public string? Message { get; set; }
[Newtonsoft.Json.JsonProperty("subject")] [Newtonsoft.Json.JsonProperty("subject")]
public string Subject { get; set; } public string? Subject { get; set; }
[Newtonsoft.Json.JsonProperty("data")] [Newtonsoft.Json.JsonProperty("data")]
public List<Song> Songs { get; set; } public List<Song>? Songs { get; set; }
#endregion #endregion
} }
} }
+2
View File
@@ -98,10 +98,12 @@ if (app.Environment.IsDevelopment())
app.UseRouting(); app.UseRouting();
app.UseAuthentication(); app.UseAuthentication();
app.UseAuthorization(); app.UseAuthorization();
#pragma warning disable ASP0014
app.UseEndpoints(endpoints => app.UseEndpoints(endpoints =>
{ {
endpoints.MapControllers(); endpoints.MapControllers();
}); });
#pragma warning restore ASP0014
app.Run(); app.Run();