mirror of
https://github.com/ikoHSE/sc-lectures.git
synced 2024-12-25 20:32:22 +03:00
Yet another update
This commit is contained in:
parent
a3d01da7b4
commit
94418b279e
@ -8,7 +8,6 @@ import qualified Data.ByteString.Lazy.Char8 as BSLC
|
||||
import Data.List
|
||||
import qualified Data.Map as M
|
||||
import Data.Text (Text)
|
||||
import Debug.Trace
|
||||
import Handlers
|
||||
import Network.HTTP.Types.Method
|
||||
import Network.HTTP.Types.Status
|
||||
@ -57,15 +56,10 @@ runAuthHandler ::
|
||||
runAuthHandler f req = do
|
||||
let authCookie =
|
||||
fmap snd
|
||||
. traceShowId
|
||||
. find ((==) authCookieNameBS . fst)
|
||||
. traceShowId
|
||||
. mconcat
|
||||
. traceShowId
|
||||
. fmap (parseCookies . snd)
|
||||
. traceShowId
|
||||
. filter ((==) "Cookie" . fst)
|
||||
. traceShowId
|
||||
$ requestHeaders req
|
||||
decodedCookie = authCookie >>= either (const Nothing) Just . decodeCookie
|
||||
cookiesTVar <- asks cookies
|
||||
|
@ -102,7 +102,7 @@ class ServerError e where
|
||||
serverErrorStatus _ = status422
|
||||
|
||||
throwServerError ::
|
||||
(MonadError (ServerResponse ByteString) m, ServerError e, Show e) =>
|
||||
(MonadError ResponseError m, ServerError e, Show e) =>
|
||||
e ->
|
||||
m a
|
||||
throwServerError e =
|
||||
|
Loading…
Reference in New Issue
Block a user