def create
      authorize! :sync_apps, @parent_organization

      # Some weird behaviour with Her and has_one. If app_instances_sync.find is called somewhere before the create,
      # Her won't detect the organization_id as dirty and won't submit it.
      sync = @parent_organization.app_instances_sync.build(mode: params[:mode])
      sync.organization_id_will_change!
      sync.save

      connectors = sync.connectors

      render json: results(connectors)
    end
def create
      authorize! :sync_apps, @parent_organization

      # Some weird behaviour with Her and has_one. If app_instances_sync.find is called somewhere before the create,
      # Her won't detect the organization_id as dirty and won't submit it.
      sync = @parent_organization.app_instances_sync.build(mode: params[:mode])
      sync.organization_id_will_change!
      sync.save

      connectors = sync.connectors

      render json: results(connectors)
    end
POST /mnoe/jpi/v1/organizations/org-fbba/app_instances_sync