fix: wrong naming and useless import

This commit is contained in:
Bluub
2022-02-08 10:24:05 +01:00
parent b5eb05a27f
commit 486934e845
3 changed files with 12 additions and 5 deletions
+8 -4
View File
@@ -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
}
-1
View File
@@ -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 }
+4
View File
@@ -0,0 +1,4 @@
- toPassword check security
- Separate User and UserDB
- Craft JWT ?
- Crud pipelines