adjusted save note argument signature
This commit is contained in:
parent
9a5a082f6d
commit
538ddeeb4f
@ -25,11 +25,11 @@ namespace BinaryDad.Notes
|
||||
return base.OnConnectedAsync();
|
||||
}
|
||||
|
||||
public async Task SaveNote(string content, string noteName)
|
||||
public async Task SaveNote(string noteName, string content)
|
||||
{
|
||||
try
|
||||
{
|
||||
noteService.SaveNote(content, noteName);
|
||||
noteService.SaveNote(noteName, content);
|
||||
|
||||
// find all other connections except for the current one
|
||||
var clientConnections = NoteContext.ClientNotes
|
||||
|
@ -30,7 +30,7 @@
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void SaveNote(string content, string noteName)
|
||||
public void SaveNote(string noteName, string content)
|
||||
{
|
||||
File.WriteAllText(GetFilePath(noteName), content);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
{
|
||||
ICollection<string> GetNoteNames();
|
||||
string GetNote(string noteName);
|
||||
void SaveNote(string content, string noteName);
|
||||
void SaveNote(string noteName, string content);
|
||||
void DeleteNote(string noteName);
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ function saveContent($textarea) {
|
||||
|
||||
var content = $textarea.val();
|
||||
|
||||
connection.invoke('SaveNote', content, noteName).then(function () {
|
||||
connection.invoke('SaveNote', noteName, content).then(function () {
|
||||
showToast('#saved-indicator');
|
||||
}).catch(function (err) {
|
||||
console.error(err.toString());
|
||||
|
Loading…
x
Reference in New Issue
Block a user