early work on supporting multiple files

This commit is contained in:
Ryan Peters
2023-02-07 12:21:22 -05:00
parent ed90291b93
commit f610664230
6 changed files with 36 additions and 22 deletions

View File

@ -1,4 +1,6 @@
let connection = new signalR.HubConnectionBuilder()
const noteName = document.location.pathname.substring(1);
let connection = new signalR.HubConnectionBuilder()
.withAutomaticReconnect()
.withUrl("/noteHub")
.build();
@ -29,7 +31,7 @@ function saveContent($textarea) {
var content = $textarea.val();
connection.invoke('SaveNote', content).then(function () {
connection.invoke('SaveNote', content, noteName).then(function () {
showToast('#saved-indicator');
}).catch(function (err) {
console.error(err.toString());