add delete endpoint
This commit is contained in:
@ -32,6 +32,13 @@
|
||||
File.WriteAllText(GetFilePath(noteName), content);
|
||||
}
|
||||
|
||||
public void DeleteNote(string noteName)
|
||||
{
|
||||
var filePath = GetFilePath(noteName);
|
||||
|
||||
File.Delete(filePath);
|
||||
}
|
||||
|
||||
private void CheckFile(string noteName)
|
||||
{
|
||||
var filePath = GetFilePath(noteName);
|
||||
|
@ -5,5 +5,6 @@
|
||||
ICollection<string> GetNoteNames();
|
||||
string GetText(string? noteName);
|
||||
void SaveText(string content, string? noteName);
|
||||
void DeleteNote(string noteName);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user