<commit_before>module Spree
  module Api
    module V2
      module Storefront
        class AccountController < ::Spree::Api::V2::BaseController
          def show
            raise ActiveRecord::RecordNotFound if spree_current_user.nil?

            render_serialized_payload { serialize_resource(resource) }
          end

          private

          def resource
            spree_current_user
          end

          def serialize_resource(resource)
            dependencies[:resource_serializer].new(
              resource,
              include: resource_includes
            ).serializable_hash
          end

          def dependencies
            { resource_serializer: Spree::V2::Storefront::AccountSerializer }
          end
        end
      end
    end
  end
end<commit_msg>Add missing `fields` param to AccountsController<commit_after>module Spree
  module Api
    module V2
      module Storefront
        class AccountController < ::Spree::Api::V2::BaseController
          def show
            raise ActiveRecord::RecordNotFound if spree_current_user.nil?

            render_serialized_payload { serialize_resource(resource) }
          end

          private

          def resource
            spree_current_user
          end

          def serialize_resource(resource)
            dependencies[:resource_serializer].new(
              resource,
              include: resource_includes,
              fields: sparse_fields
            ).serializable_hash
          end

          def dependencies
            { resource_serializer: Spree::V2::Storefront::AccountSerializer }
          end
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.05078597339782346, 'fraction_numerical': 0.0036275695284159614, 'mean_word_length': 1.7956081081081081, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3522404', 'n_tokens_mistral': 399, 'n_tokens_neox': 389, 'n_words': 92}