/users/1234.json: include upload_limit/max_upload_limit/favorite_group_count.
This commit is contained in:
@@ -38,7 +38,7 @@ class UsersController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@user = User.find(params[:id])
|
@user = User.find(params[:id])
|
||||||
@presenter = UserPresenter.new(@user)
|
@presenter = UserPresenter.new(@user)
|
||||||
respond_with(@user, :methods => [:wiki_page_version_count, :artist_version_count, :artist_commentary_version_count, :pool_version_count, :forum_post_count, :comment_count, :appeal_count, :flag_count, :positive_feedback_count, :neutral_feedback_count, :negative_feedback_count])
|
respond_with(@user, methods: @user.full_attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|||||||
@@ -681,6 +681,18 @@ class User < ActiveRecord::Base
|
|||||||
list
|
list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# extra attributes returned for /users/:id.json but not for /users.json.
|
||||||
|
def full_attributes
|
||||||
|
[
|
||||||
|
:wiki_page_version_count, :artist_version_count,
|
||||||
|
:artist_commentary_version_count, :pool_version_count,
|
||||||
|
:forum_post_count, :comment_count, :favorite_group_count,
|
||||||
|
:appeal_count, :flag_count, :positive_feedback_count,
|
||||||
|
:neutral_feedback_count, :negative_feedback_count, :upload_limit,
|
||||||
|
:max_upload_limit
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
def to_legacy_json
|
def to_legacy_json
|
||||||
return {
|
return {
|
||||||
"name" => name,
|
"name" => name,
|
||||||
|
|||||||
Reference in New Issue
Block a user