add legacy artist xml api
This commit is contained in:
@@ -21,11 +21,15 @@ class LegacyController < ApplicationController
|
||||
end
|
||||
|
||||
def users
|
||||
@users = User.search(params).limit(100)
|
||||
@users = User.limit(100).search(params).paginate(params[:page])
|
||||
end
|
||||
|
||||
def tags
|
||||
@tags = Tag.search(params).limit(100)
|
||||
@tags = Tag.limit(100).search(params).paginate(params[:page])
|
||||
end
|
||||
|
||||
def artists
|
||||
@artists = Artist.limit(100).search(params[:search]).paginate(params[:page])
|
||||
end
|
||||
|
||||
def unavailable
|
||||
|
||||
6
app/views/legacy/artists.xml.erb
Normal file
6
app/views/legacy/artists.xml.erb
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<artists type="array">
|
||||
<% @artists.each do |artist| %>
|
||||
<artist group_name="<%= artist.group_name %>" other_names="<%= artist.other_names %>" urls="<%= artist.urls.map {|x| x.url}.join(" ") %>" is_active="<%= artist.is_active? %>" name="<%= artist.name %>" updater_id="0" id="<%= artist.id %>" version="0"/>
|
||||
<% end %>
|
||||
</artists>
|
||||
Reference in New Issue
Block a user