DEV: Stop serializing user_auth_token_logs (#8043)

These are no longer used in the user interface
This commit is contained in:
David Taylor 2019-08-27 13:07:03 +01:00 committed by GitHub
parent e805d44965
commit f2331ef07f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 25 deletions

View File

@ -120,8 +120,7 @@ class UserSerializer < BasicUserSerializer
:mailing_list_posts_per_day, :mailing_list_posts_per_day,
:can_change_bio, :can_change_bio,
:user_api_keys, :user_api_keys,
:user_auth_tokens, :user_auth_tokens
:user_auth_token_logs
untrusted_attributes :bio_raw, untrusted_attributes :bio_raw,
:bio_cooked, :bio_cooked,
@ -210,15 +209,6 @@ class UserSerializer < BasicUserSerializer
) )
end end
def user_auth_token_logs
ActiveModel::ArraySerializer.new(
object.user_auth_token_logs.where(
action: UserAuthToken::USER_ACTIONS
).order(:created_at).reverse_order,
each_serializer: UserAuthTokenLogSerializer
)
end
def bio_raw def bio_raw
object.user_profile.bio_raw object.user_profile.bio_raw
end end

View File

@ -2380,7 +2380,6 @@ export default {
can_change_bio: true, can_change_bio: true,
user_api_keys: null, user_api_keys: null,
user_auth_tokens: [], user_auth_tokens: [],
user_auth_token_logs: [],
invited_by: null, invited_by: null,
groups: [ groups: [
{ {
@ -2677,19 +2676,6 @@ export default {
is_active: true is_active: true
} }
], ],
user_auth_token_logs: [
{
id: 4,
client_ip: "127.0.0.1",
location: "unknown",
browser: "Google Chrome",
device: "GNU/Linux Computer",
os: "Linux",
icon: "fab-linux",
created_at: "2019-06-26T08:41:18.448Z",
action: "Log In"
}
],
invited_by: null, invited_by: null,
groups: [ groups: [
{ {