 (defmethod post-control-event! :deleted-ssh-key
   [target message {:keys [project-id hostname fingerprint]} previous-state current-state]
   (let [project-name (vcs-url/project-name project-id)
-        vcs-type (vcs-url/vcs-type project-id)
         api-ch (get-in current-state [:comms :api])]
     (ajax/ajax :delete
-               (api-path/project-ssh-key vcs-type project-name)
+               (gstring/format "/api/v1/project/%s/ssh-key" project-name)
                :delete-ssh-key
                api-ch
                :params {:fingerprint fingerprint

  [_ _ {:keys [login scope]} _ {{api-ch :api} :comms}]
  (api/set-user-admin-scope login scope api-ch))

(defmethod control-event :system-setting-changed
  [_ _ {:keys [name]} state]
  (update-in state state/system-settings-path
             (fn [settings]
               (mapv #(if (= name (:name %))
                        (assoc % :updating true)
                        %)
                     settings))))

(defmethod post-control-event! :system-setting-changed
  [_ _ {:keys [name value]} _ {{api-ch :api} :comms}]
  (api/set-system-setting name value api-ch))

(defmethod control-event :insights-sorting-changed
  [_ _ {:keys [new-sorting]} state]
  (assoc-in state state/insights-sorting-path new-sorting))

           (put! api-ch [:org-plan (:status plan-api-result) (assoc plan-api-result :context {:org-name org-name})])
           (put! nav-ch [:navigate! {:path (routes/v1-org-settings {:org org-name
                                                                    :vcs_type vcs_type})
                                     :replace-token? true}])
           (analytics/track {:event-type :plan-cancelled
                             :current-state current-state})))
       (release-button! uuid (:status api-result))))))

(defn track-and-redirect [event properties owner path]
