mirror of
https://github.com/zoriya/Aeris.git
synced 2026-05-29 17:34:24 +00:00
fix: wrong naming and useless import
This commit is contained in:
+8
-4
@@ -80,12 +80,16 @@ unprotected cs jwts =
|
||||
:<|> signupHandler
|
||||
|
||||
data AuthAPI mode = AuthAPI
|
||||
{ login :: mode :- (Servant.Auth.Server.Auth '[JWT] User' :> Protected)
|
||||
, me :: mode :- Unprotected
|
||||
{
|
||||
protectedApi :: mode
|
||||
:- (Servant.Auth.Server.Auth '[JWT] User'
|
||||
:> Protected)
|
||||
, unprotectedApi :: mode
|
||||
:- Unprotected
|
||||
} deriving stock Generic
|
||||
|
||||
authHandler :: CookieSettings -> JWTSettings -> AuthAPI (AsServerT AppM)
|
||||
authHandler cs jwts = AuthAPI
|
||||
{ login = protected
|
||||
, me = unprotected cs jwts
|
||||
{ protectedApi = protected
|
||||
, unprotectedApi = unprotected cs jwts
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import Data.Functor.Identity (Identity)
|
||||
import Data.Text (Text)
|
||||
import Data.Aeson (FromJSON, ToJSON)
|
||||
import Rel8
|
||||
import Rel8 (Insert(onConflict), each)
|
||||
import Password (HashedPassword (HashedPassword))
|
||||
|
||||
newtype UserId = UserId { toInt64 :: Int64 }
|
||||
|
||||
Reference in New Issue
Block a user