 (defmethod post-control-event! :saved-ssh-key
   [target message {:keys [project-id ssh-key]} 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])]
     (button-ajax :post
-                 (gstring/format "/api/v1/project/%s/ssh-key" project-name)
+                 (api-path/project-ssh-key vcs-type project-name)
                  :save-ssh-key
                  api-ch
                  :params ssh-key

(defmethod post-control-event! :set-heroku-deploy-user
  [target message {:keys [project-id login]} previous-state current-state]
  (let [project-name (vcs-url/project-name project-id)
        api-ch (get-in current-state [:comms :api])]
    (button-ajax :post
                 (gstring/format "/api/v1/project/%s/heroku-deploy-user" project-name)
                 :set-heroku-deploy-user
                 api-ch
                 :context {:project-id project-id

(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)
               :delete-ssh-key
               api-ch
               :params {:fingerprint fingerprint
