Sha256: 2796aa5d0859a468d4426bb800926478397f0c97e3208f59206ffffdab44ed36
Contents?: true
Size: 657 Bytes
Versions: 26
Compression:
Stored size: 657 Bytes
Contents
# frozen_string_literal: true require "shopify_cli" module Extension module Tasks class GetApps < ShopifyCLI::Task def call(context:) org_id = ShopifyCLI::DB.get(:organization_id) return [] unless org_id organization = ShopifyCLI::PartnersAPI::Organizations.fetch_with_apps(context, id: org_id) apps_owned_by_organization(organization) end private def apps_owned_by_organization(organization) return [] unless organization&.dig("apps") organization["apps"].map do |app| Converters::AppConverter.from_hash(app, organization) end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems