Improve form layout

This commit is contained in:
Jonathan Cremin 2014-12-04 00:35:04 +00:00
parent 50004d4ad6
commit c955039306
3 changed files with 21 additions and 7 deletions

View file

@ -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) {