Check decryption before redirecting (as was intended)
This commit is contained in:
parent
db92528884
commit
6bf0f321cf
@ -20,12 +20,18 @@ import Import hiding (Proxy)
|
||||
|
||||
import Data.Proxy
|
||||
|
||||
import qualified Data.UUID.Cryptographic as UUID
|
||||
|
||||
|
||||
class KnownSymbol namespace => CryptoRoute ciphertext namespace where
|
||||
cryptoIDRoute :: CryptoID namespace ciphertext -> Handler (Route UniWorX)
|
||||
|
||||
instance CryptoRoute UUID "Submission" where
|
||||
cryptoIDRoute = return . SubmissionR
|
||||
cryptoIDRoute cID = do
|
||||
cIDKey <- getsYesod appCryptoIDKey
|
||||
sId <- UUID.decrypt cIDKey cID
|
||||
|
||||
return $ SubmissionR cID
|
||||
|
||||
|
||||
class Dispatch ciphertext (x :: [Symbol]) where
|
||||
|
||||
Loading…
Reference in New Issue
Block a user