mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Began implementing on-demand websocket server
This commit is contained in:
@@ -172,6 +172,14 @@ $(document).ready(function(){
|
||||
});
|
||||
$(document).on('click', '.logout-btn', function(){window.location.href = '/logout'});
|
||||
$(document).on('click', '.import-btn', async function(){
|
||||
$.ajax({
|
||||
type: "GET", url: "/live", data: {hook: 'import_books'},
|
||||
success: function (response) {
|
||||
},
|
||||
error: function (response) {
|
||||
customlog(["Failure", response]);
|
||||
}
|
||||
});
|
||||
let connection = await ImportBooks(server);
|
||||
popover.html('<div id="psout" class="container">');
|
||||
let psout = $('#psout')
|
||||
@@ -286,7 +294,7 @@ function OpenSocket(address) {
|
||||
ping(connection)
|
||||
};
|
||||
connection.onmessage = function(rcvd){
|
||||
sock_rx(rcvd)
|
||||
sock_rx(rcvd)
|
||||
};
|
||||
resolve(connection);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user