Got drag-n-drop to schedule working.

This commit is contained in:
rainbow napkin 2025-02-03 22:13:51 -05:00
parent 90be85de26
commit 85bbe39578
6 changed files with 152 additions and 47 deletions

View file

@ -55,16 +55,22 @@ module.exports = class{
async queueURL(socket, data){
try{
//Set url
const url = encodeURI(data.url);
var url = data.url;
//pull URL and start time from data
//let {url, start, title} = data;
//If we where given a bad URL
if(!validator.isURL(url)){
//Bitch, moan, complain...
loggerUtils.socketErrorHandler(socket, "Bad URL!", "validation");
//and ignore it!
return;
//Attempt to fix the situation by encoding it
url = encodeURI(url);
//If it's still bad
if(!validator.isURL(url)){
//Bitch, moan, complain...
loggerUtils.socketErrorHandler(socket, "Bad URL!", "validation");
//and ignore it!
return;
}
}
//If the title is too long