Version.purs 388 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
module Gargantext.Version where


import Data.Maybe (Maybe(..))
import Effect.Aff (Aff)

import Gargantext.Config.REST as REST
import Gargantext.Ends (toUrl)
import Gargantext.Sessions (Session(..))

type Version = String


foreign import version :: Version

getBackendVersion :: Session -> Aff Version
getBackendVersion (Session { backend }) = REST.get Nothing (toUrl backend "version")