Artist import, page
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
module Api
|
||||
class AlbumsController < ::ApplicationController
|
||||
def picture
|
||||
album = Album.find(params[:id])
|
||||
redirect_to album.load_pic
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
module Api
|
||||
class ArtistsController < ::ApplicationController
|
||||
def show
|
||||
artist = Artist.with_name(params[:id].gsub("+", " "))
|
||||
return render json: { fail: true } if artist.nil?
|
||||
|
||||
render json: artist.dump_json
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,3 +1,7 @@
|
||||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
def main
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user