         (->> (case registry
                :v2 (api/registry-v2 id)
                :dockerhub (api/dockerhub id)
-               :ecr (api/registry-ecr id))
+               :ecr (api/registry-ecr id)
+               :acr (api/registry-acr id))
              (resp-ok))
         (resp-error 400 (str "Unknown registry type [" registry "]"))))))
 

        (->> (case registry
               :v2 (api/registries-v2 owner)
               :dockerhub (api/dockerhubs owner)
               :ecr (api/registries-ecr owner))
             (resp-ok))
        (resp-error 400 (str "Unknown registry type [" registry "]"))))))


    (catch Exception e
      (resp-error 400 (get-in (ex-data e) [:body :error])))))

(defmethod registry-create :acr
  [_ payload]
  (try
    (let [url (api/acr-url payload)
          payload (assoc payload :url url)
          info (api/registry-acr-info payload)
          response (api/create-acr-registry payload)]
      (if (some? response)
        (resp-created (select-keys response [:id]))
        (resp-error 400 "Azure ACR account with given service principals already linked")))
    (catch Exception e
      (resp-error 400 (get-in (ex-data e) [:body :error])))))

(defmethod dispatch :registry-create [_]
  (fn [{:keys [params identity route-params]}]
    (let [owner (get-in identity [:usr :username])
