module Gargantext.API.ThrowAll where
-import Control.Monad.Error.Class (MonadError(..))
+import Control.Monad.Except (MonadError(..))
import Control.Lens ((#))
import Servant
import Servant.Auth.Server (AuthResult(..))
+
import Gargantext.Prelude
import Gargantext.API.Prelude (GargServerM, _ServerError)
import Gargantext.API.Routes (GargPrivateAPI, serverPrivateGargAPI')
serverPrivateGargAPI :: GargServerM env err GargPrivateAPI
serverPrivateGargAPI (Authenticated auser) = serverPrivateGargAPI' auser
serverPrivateGargAPI _ = throwAll' (_ServerError # err401)
--- Here throwAll' requires a concrete type for the monad.
\ No newline at end of file
+-- Here throwAll' requires a concrete type for the monad.