fix some nullable issues

This commit is contained in:
Ryan Peters 2023-05-12 12:55:05 -04:00
parent faaa0dba8f
commit 114e1499f8
2 changed files with 5 additions and 5 deletions

View File

@ -2,6 +2,6 @@ namespace BinaryDad.Notes.Models;
public class ContentModel
{
public ICollection<string> NoteNames { get; set; }
public string Text { get; set; }
public ICollection<string> NoteNames { get; set; } = new List<string>();
public string Text { get; set; } = string.Empty;
}

View File

@ -2,8 +2,8 @@
{
public class FileNoteService : INoteService
{
private readonly string? defaultFileName;
private readonly string? filePath;
private readonly string defaultFileName;
private readonly string filePath;
public FileNoteService(IConfiguration configuration)
{
@ -39,7 +39,7 @@
File.Delete(filePath);
}
private void CheckFile(string noteName)
private void CheckFile(string? noteName)
{
var filePath = GetFilePath(noteName);