zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

commit 5be29a24e906445654e0f9421e2b6931887c5ac1
parent 19eb84f3d69908b511d997bcad736d80ad5534dd
Author: srfsh <dev@srf.sh>
Date:   Mon, 18 Jul 2022 15:07:31 +0300

sw_pass: require admin key from the middleware

Diffstat:
Msrc/zenflows/sw_pass/resolv.ex | 4+---
Msrc/zenflows/sw_pass/type.ex | 4----
2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/zenflows/sw_pass/resolv.ex b/src/zenflows/sw_pass/resolv.ex @@ -1,12 +1,10 @@ defmodule Zenflows.SWPass.Resolv do @moduledoc "Resolvers of softwarepassport-related queries." -alias Zenflows.Admin alias Zenflows.SWPass.Domain def import_repos(%{url: url, admin_key: key}, _) do - with :ok <- Admin.auth(key), - {:ok, _} <- Domain.import_repos(url) do + with {:ok, _} <- Domain.import_repos(url) do {:ok, "successfully imported"} else _ -> {:error, "something went wrong"} diff --git a/src/zenflows/sw_pass/type.ex b/src/zenflows/sw_pass/type.ex @@ -18,12 +18,8 @@ end object :mutation_sw_pass do @desc "Import repositories from a softwarepassport instance." field :import_repos, :string do - @desc "The configuration-defined key to authenticate admin calls." - arg :admin_key, non_null(:string) - @desc "The URL where all the repository information is listed." arg :url, non_null(:string) - resolve &Resolv.import_repos/2 end end