diff --git a/project.clj b/project.clj index 129c10c8..6d890b40 100644 --- a/project.clj +++ b/project.clj @@ -38,7 +38,7 @@ [org.cyverse/cyverse-groups-client "0.1.9"] [org.cyverse/common-cfg "2.8.3"] [org.cyverse/common-cli "2.8.2"] - [org.cyverse/common-swagger-api "3.4.6"] + [org.cyverse/common-swagger-api "3.4.7"] [org.cyverse/kameleon "3.0.10" :exclusion [com.impossibl.pgjdbc-ng/pgjdbc-ng]] [com.impossibl.pgjdbc-ng/pgjdbc-ng "0.8.9"] diff --git a/src/terrain/clients/apps/raw.clj b/src/terrain/clients/apps/raw.clj index 9e98a0bf..f5aed9cc 100644 --- a/src/terrain/clients/apps/raw.clj +++ b/src/terrain/clients/apps/raw.clj @@ -170,6 +170,16 @@ :content-type :json :as :json})))) +(defn set-app-versions-order + [system-id app-id update-request] + (:body + (client/put (apps-url "apps" system-id app-id "versions") + (disable-redirects + {:query-params (secured-params) + :form-params update-request + :content-type :json + :as :json})))) + (defn preview-args [system-id app] (:body diff --git a/src/terrain/routes/apps/versions.clj b/src/terrain/routes/apps/versions.clj index a4842a75..acfbd2a9 100644 --- a/src/terrain/routes/apps/versions.clj +++ b/src/terrain/routes/apps/versions.clj @@ -30,6 +30,14 @@ :description schema/AppVersionCreateDocs (ok (apps/create-app-version system-id app-id body))) + (PUT "/" [] + :middleware [require-authentication] + :body [body schema/AppVersionOrderRequest] + :return schema/App + :summary schema/AppVersionOrderSummary + :description schema/AppVersionOrderDocs + (ok (apps/set-app-versions-order system-id app-id body))) + (context "/:version-id" [] :path-params [version-id :- schema/AppVersionIdParam]