 (defn pipeline-routes [pipeline]
   (ring-json/wrap-json-response
     (routes (context "/lambdaui/api" [] (new-api/api-routes pipeline))
+            (POST "/lambdaui/api/triggerNew" [] (do (trigger-new pipeline) {}))
             (context "/api" [] (old-api/rest-api pipeline))
             (GET "/old" [] (old-ui/ui-page pipeline))
             (route/resources "/" {:root "public"})

    (println "Started Server on port " port ". CTRL+C to abort.")
    (start-server port)))

(defn get-trigger-id []
  (((val (last (lambdacd.internal.pipeline-state/get-all (get-in @pipe [:context :pipeline-state-component])))) '(1 1)) :trigger-id)
  )

(defn trigger-new []
  (let [ctx (:context @pipe)]
    (manualtrigger/post-id ctx (get-trigger-id) {})))
(ns lambdaui.core
  (:require
    [compojure.core :refer [routes GET context POST]]
    [lambdaui.api :as new-api]
    [lambdacd-git.core :as git]
    [lambdacd.core :as lambdacd]
