diff --git a/Controllers/ApiController.cs b/Controllers/ApiController.cs index 88d6c5d..049eb56 100644 --- a/Controllers/ApiController.cs +++ b/Controllers/ApiController.cs @@ -11,6 +11,6 @@ namespace BinaryDad.Notes.Controllers public ApiController(INoteService noteService) => this.noteService = noteService; [Route("note/{noteName}")] - public string Note(string noteName) => noteService.GetText(noteName); + public string Note(string noteName) => noteService.GetNote(noteName); } } diff --git a/Controllers/NoteController.cs b/Controllers/NoteController.cs index 67401d4..3f22767 100644 --- a/Controllers/NoteController.cs +++ b/Controllers/NoteController.cs @@ -18,7 +18,7 @@ public class NoteController : Controller var model = new ContentModel { CurrentNote = noteName, - Text = noteService.GetText(noteName), + Text = noteService.GetNote(noteName), NoteNames = noteService.GetNoteNames() }; diff --git a/NoteHub.cs b/NoteHub.cs index 44a9972..5e84bbc 100644 --- a/NoteHub.cs +++ b/NoteHub.cs @@ -25,7 +25,7 @@ namespace BinaryDad.Notes public async Task SaveNote(string content, string noteName) { - noteService.SaveText(content, noteName); + noteService.SaveNote(content, noteName); // find all other connections except for the current one var clientConnections = NoteContext.ClientNotes diff --git a/Services/FileNoteService.cs b/Services/FileNoteService.cs index cc8ffb2..6e6b0f8 100644 --- a/Services/FileNoteService.cs +++ b/Services/FileNoteService.cs @@ -16,7 +16,7 @@ } } - public string GetText(string noteName) + public string GetNote(string noteName) { CheckFile(noteName); @@ -30,7 +30,7 @@ .ToList(); } - public void SaveText(string content, string noteName) + public void SaveNote(string content, string noteName) { File.WriteAllText(GetFilePath(noteName), content); } @@ -51,7 +51,7 @@ { Directory.CreateDirectory(folderPath); - SaveText("Hi! Feel free to start typing. Everything will be saved soon after you are done typing.", noteName); + SaveNote("Hi! Feel free to start typing. Everything will be saved soon after you are done typing.", noteName); } } diff --git a/Services/INoteService.cs b/Services/INoteService.cs index 9ba6fc7..eef389b 100644 --- a/Services/INoteService.cs +++ b/Services/INoteService.cs @@ -3,8 +3,8 @@ public interface INoteService { ICollection GetNoteNames(); - string GetText(string noteName); - void SaveText(string content, string noteName); + string GetNote(string noteName); + void SaveNote(string content, string noteName); void DeleteNote(string noteName); } }