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++;
}
curDir = System.IO.Directory.GetParent(curDir).ToString();
var parentDirectory = System.IO.Directory.GetParent(curDir);
curDir = parentDirectory!.ToString();
}
}
catch (Exception ex)
@@ -3,7 +3,6 @@ using NLog;
using Icarus.Controllers.Utilities;
using Icarus.Models;
using Icarus.Database.Contexts;
using TagLib.Mpeg4;
namespace Icarus.Controllers.Managers;
+3 -3
View File
@@ -219,11 +219,11 @@ public class SongDataController : BaseController
{
#region Properties
[Newtonsoft.Json.JsonProperty("message")]
public string Message { get; set; }
public string? Message { get; set; }
[Newtonsoft.Json.JsonProperty("subject")]
public string Subject { get; set; }
public string? Subject { get; set; }
[Newtonsoft.Json.JsonProperty("data")]
public List<Song> Songs { get; set; }
public List<Song>? Songs { get; set; }
#endregion
}
}
+2
View File
@@ -98,10 +98,12 @@ if (app.Environment.IsDevelopment())
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
#pragma warning disable ASP0014
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
#pragma warning restore ASP0014
app.Run();