Render share page before all matches are found.

This commit is contained in:
Jonathan Cremin 2014-12-13 15:56:52 +00:00
parent 6f3e8b06a6
commit 4bfdf0dc45
7 changed files with 81 additions and 64 deletions

View file

@ -109,6 +109,7 @@ module.exports.search = function(data) {
}
var path = "/search?q=" + encodeURIComponent(query) + "&type=" + type + "&client_id=" + credentials.key;
return request.get(apiRoot + path).promise().then(function(res) {
if (!res.body.data[0]) {
var matches = album.match(/^[^\(\[]+/);