chore(avs): reactivate avs development dummy
This commit is contained in:
parent
32b1074dca
commit
0922723a85
@ -13,10 +13,10 @@ import qualified Data.Text as Text
|
|||||||
|
|
||||||
import Servant
|
import Servant
|
||||||
import Servant.Client
|
import Servant.Client
|
||||||
-- #ifdef DEVELOPMENT
|
#ifdef DEVELOPMENT
|
||||||
-- #else
|
#else
|
||||||
import Servant.Client.Core (requestPath)
|
import Servant.Client.Core (requestPath)
|
||||||
-- #endif
|
#endif
|
||||||
|
|
||||||
import Model.Types.Avs
|
import Model.Types.Avs
|
||||||
|
|
||||||
@ -68,15 +68,15 @@ avsQueryAllLicences = AvsQueryGetLicences $ AvsObjPersonId avsPersonIdZero
|
|||||||
|
|
||||||
|
|
||||||
mkAvsQuery :: BaseUrl -> BasicAuthData -> ClientEnv -> AvsQuery
|
mkAvsQuery :: BaseUrl -> BasicAuthData -> ClientEnv -> AvsQuery
|
||||||
-- #ifdef DEVELOPMENT
|
#ifdef DEVELOPMENT
|
||||||
-- mkAvsQuery _ _ _ = AvsQuery
|
mkAvsQuery _ _ _ = AvsQuery
|
||||||
-- { avsQueryPerson = \_ -> return . Right $ AvsResponsePerson mempty
|
{ avsQueryPerson = \_ -> return . Right $ AvsResponsePerson mempty
|
||||||
-- , avsQueryStatus = \_ -> return . Right $ AvsResponseStatus mempty
|
, avsQueryStatus = \_ -> return . Right $ AvsResponseStatus mempty
|
||||||
-- , avsQueryContact = \_ -> return . Right $ AvsResponseContact $ Set.singleton $ AvsDataContact (AvsPersonId 1234567) (AvsPersonInfo "123123123" "Heribert" "Sumpfmeier" (-1) Nothing Nothing Nothing Nothing) (AvsFirmInfo "Lange Firma" 7 "Kurz" Nothing Nothing Nothing Nothing Nothing Nothing)
|
, avsQueryContact = \_ -> return . Right $ AvsResponseContact $ Set.singleton $ AvsDataContact (AvsPersonId 1234567) (AvsPersonInfo "123123123" "Heribert" "Sumpfmeier" (-1) Nothing Nothing Nothing Nothing) (AvsFirmInfo "Lange Firma" 7 "Kurz" Nothing Nothing Nothing Nothing Nothing Nothing)
|
||||||
-- , avsQuerySetLicences = \_ -> return . Right $ AvsResponseSetLicences mempty
|
, avsQuerySetLicences = \_ -> return . Right $ AvsResponseSetLicences mempty
|
||||||
-- , avsQueryGetAllLicences = return . Right $ AvsResponseGetLicences mempty
|
, avsQueryGetAllLicences = return . Right $ AvsResponseGetLicences mempty
|
||||||
-- }
|
}
|
||||||
-- #else
|
#else
|
||||||
mkAvsQuery baseUrl basicAuth cliEnv = AvsQuery
|
mkAvsQuery baseUrl basicAuth cliEnv = AvsQuery
|
||||||
{ avsQueryPerson = \q -> liftIO $ catch404toEmpty <$> runClientM (rawQueryPerson q) cliEnv
|
{ avsQueryPerson = \q -> liftIO $ catch404toEmpty <$> runClientM (rawQueryPerson q) cliEnv
|
||||||
, avsQueryStatus = \q -> liftIO $ runClientM (splitQuery rawQueryStatus q) cliEnv
|
, avsQueryStatus = \q -> liftIO $ runClientM (splitQuery rawQueryStatus q) cliEnv
|
||||||
@ -107,7 +107,7 @@ mkAvsQuery baseUrl basicAuth cliEnv = AvsQuery
|
|||||||
return $ view _Unwrapped' (res1 ^. _Wrapped' <> res2 ^. _Wrapped')
|
return $ view _Unwrapped' (res1 ^. _Wrapped' <> res2 ^. _Wrapped')
|
||||||
where
|
where
|
||||||
s = view _Wrapped' q
|
s = view _Wrapped' q
|
||||||
-- #endif
|
#endif
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
-- Utility Functions --
|
-- Utility Functions --
|
||||||
|
|||||||
Reference in New Issue
Block a user