Skip to content

Commit

Permalink
Merge pull request #290 from psarando/CORE-1955-app-ver-reorder
Browse files Browse the repository at this point in the history
CORE-1955 Add `PUT /apps/:system/:id/versions` endpoint passthrough
  • Loading branch information
psarando authored Oct 18, 2024
2 parents 8726de7 + 2f4359d commit c0cedda
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
10 changes: 10 additions & 0 deletions src/terrain/clients/apps/raw.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions src/terrain/routes/apps/versions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit c0cedda

Please sign in to comment.