Improve form layout
This commit is contained in:
parent
50004d4ad6
commit
c955039306
3 changed files with 21 additions and 7 deletions
|
@ -59,6 +59,12 @@ router.post('/search', function(req, res) {
|
|||
// determine spotify or google music
|
||||
var url = parse(req.body.url);
|
||||
|
||||
if (!url.host) {
|
||||
req.flash('search-error', 'Please paste a link below to find matches');
|
||||
res.redirect('/');
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.host.match(/rd\.io$/) || url.host.match(/rdio\.com$/)) {
|
||||
rdio.lookupUrl(url.href, function(result) {
|
||||
if (!result.id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue