Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Commit

Permalink
add DbBasis service
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandra Pereira <[email protected]>
  • Loading branch information
alexandrasp committed Aug 1, 2023
1 parent 2bf0310 commit c69cf35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gxtdb/service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
;; returns details about the transactor and the speculated result.
;; - entity: returns an entity document.
;; - entity-tx: return an entity transaction information.
;; - db-basis: returns the basis of this db snapshot - a map containing `xt/valid-time` and `xt/tx`
(deftype GrpcAPI [xtdb-node]
api/Service
(SubmitTx [_this {{:keys [tx-ops tx-time]} :grpc-params}]
Expand All @@ -50,6 +51,10 @@
(let [status (xt/status xtdb-node)]
{:status 200
:body (status-adapter/edn->grpc status)})))
(BbBasis
[_this {params :grpc-params}]
{:status 200
:body (controllers/db-basis xtdb-node)})

(def common-interceptors [(body-params/body-params) http/html-body])

Expand Down

0 comments on commit c69cf35

Please sign in to comment.