Tiny fix
This commit is contained in:
parent
7ec4071652
commit
3b97c12c70
|
@ -20,10 +20,8 @@ class ArtistController < ApplicationController
|
|||
best_match = results[0][:name]
|
||||
if best_match != artist_name and similar_names(artist_name, best_match)
|
||||
return render json: { status: 'corrected', correct_name: best_match }
|
||||
elsif results[0][:name] == artist_name
|
||||
elsif best_match == artist_name
|
||||
queue_loading(artist_name, results[0][:mbid])
|
||||
@artist = { artist: @artist, albums: [] }
|
||||
@loading = true
|
||||
return render json: { status: 'loading', html: render_compact_partial(:page) }
|
||||
else
|
||||
@suggestions = results.take(5)
|
||||
|
@ -39,8 +37,8 @@ class ArtistController < ApplicationController
|
|||
render json: {
|
||||
status: @artist.status_str,
|
||||
artist: @artist,
|
||||
html: render_compact_partial(:page) }, include: {albums: {include: {tracks: {}}}
|
||||
}
|
||||
html: render_compact_partial(:page)
|
||||
}, include: {albums: {include: {tracks: {}}}}
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue