Skip to content

Commit

Permalink
removing duplicate api
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsah committed May 4, 2018
1 parent b07708f commit 1b4a75c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
4 changes: 2 additions & 2 deletions repo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
<prepare>pre-install.xql</prepare>
<finish>post-install.xql</finish>
<permissions user="gawati-client-data" group="gawati-client-data" mode="rw-rw-r--"/>
<deployed>2018-05-01T23:58:43.388+05:30</deployed>
</meta>

<deployed>2018-05-03T19:45:55.814+05:30</deployed></meta>
28 changes: 0 additions & 28 deletions services/services-post.xql
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,6 @@ function client-post:document-permissions($json) {
}
};

declare
%rest:POST("{$json}")
%rest:path("/gwdc/document/permissions")
%rest:consumes("application/json")
%rest:produces("application/json")
%output:media-type("application/json")
%output:method("json")
function client-post:document-permissions($json) {
let $data := parse-json(util:base64-decode($json))
return
try {
let $iri := $data?iri
let $doc := store:get-doc($iri)
return
if (count($doc) gt 0) then
$doc/gwd:permissions
else
<return>
<error code="doc_not_found" message="document not found" />
</return>
} catch * {
<return>
<error code="sys_err_{$err:code}" message="Caught error {$err:code}: {$err:description}" />
</return>
}
};



declare
%rest:POST("{$json}")
Expand Down

0 comments on commit 1b4a75c

Please sign in to comment.