Skip to content

Commit

Permalink
fix(api): check collection parameter value
Browse files Browse the repository at this point in the history
  • Loading branch information
line-o committed Oct 5, 2023
1 parent 96287f9 commit 9d439dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/api.xql
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ declare function api:git-deploy($request as map(*)) as map(*) {
let $cleanup-res := app:cleanup-resources($config?collection, config:prefix())
let $move-col := app:move-collections($collection-staging, $config?collection, config:prefix())
let $move-res := app:move-resources($collection-staging, $config?collection, config:prefix())
let $set-permissions := app:set-permission($config?collection)
let $set-permissions := app:set-permission($config?path)
return "data move"
)

Expand Down Expand Up @@ -468,7 +468,7 @@ declare %private function api:get-default-collection-config() as map(*)? {

declare %private function api:get-collection-config($collection as xs:string?) as map(*)? {
let $git-collection :=
if (exists($collection) and not(empty($collection)))
if (exists($collection) and $collection ne '')
then xmldb:decode-uri($collection)
else config:default-collection()

Expand Down

0 comments on commit 9d439dc

Please sign in to comment.