DEV: Stop serializing user_auth_token_logs (#8043)

DEV: Stop serializing user_auth_token_logs (#8043)

These are no longer used in the user interface

diff --git a/app/serializers/user_serializer.rb b/app/serializers/user_serializer.rb
index 0379fee..43c038b 100644
--- a/app/serializers/user_serializer.rb
+++ b/app/serializers/user_serializer.rb
@@ -120,8 +120,7 @@ class UserSerializer < BasicUserSerializer
                      :mailing_list_posts_per_day,
                      :can_change_bio,
                      :user_api_keys,
-                     :user_auth_tokens,
-                     :user_auth_token_logs
+                     :user_auth_tokens
 
   untrusted_attributes :bio_raw,
                        :bio_cooked,
@@ -210,15 +209,6 @@ class UserSerializer < BasicUserSerializer
     )
   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
     object.user_profile.bio_raw
   end
diff --git a/test/javascripts/fixtures/user_fixtures.js.es6 b/test/javascripts/fixtures/user_fixtures.js.es6
index e8a42c3..e68bb10 100644
--- a/test/javascripts/fixtures/user_fixtures.js.es6
+++ b/test/javascripts/fixtures/user_fixtures.js.es6
@@ -2380,7 +2380,6 @@ export default {
       can_change_bio: true,
       user_api_keys: null,
       user_auth_tokens: [],
-      user_auth_token_logs: [],
       invited_by: null,
       groups: [
         {
@@ -2677,19 +2676,6 @@ export default {
           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,
       groups: [
         {

GitHub sha: f2331ef0

1 Like

DEV: Remove unused user_auth_token_log_serializer