 (defmethod post-control-event! :deleted-project-api-token
   [target message {:keys [project-id token]} 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
-               (gstring/format "/api/v1/project/%s/token/%s" project-name token)
+               (api-path/project-token vcs-type project-name token)
                :delete-project-api-token
                api-ch
                :context {:project-id project-id

                 (gstring/format "/api/v1/project/%s/enable" project)
                 :stop-building-project
                 api-ch
                 :context {:project-id project-id}
                 :events {:success #(analytics/track {:event-type :project-builds-stopped
                                                      :current-state current-state
                                                      :properties {:org org-name
                                                                   :repo repo-name}})})))

;; XXX: clean this up
(defmethod post-control-event! :container-parent-scroll

           (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}])))
       (release-button! uuid (:status api-result))))))

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