summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb
blob: e39277aa1be4cfd1ca6103595b32881f64fc681b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'chef/chef_fs/data_handler/data_handler_base'

class Chef
  module ChefFS
    module DataHandler
      class OrganizationInvitesDataHandler < DataHandlerBase
        def normalize(invites, _entry)
          invites.map { |invite| invite.is_a?(Hash) ? invite['username'] : invite }.sort.uniq
        end

        def minimize(invites, _entry)
          invites
        end
      end
    end
  end
end