delete tokens

This commit is contained in:
nek0 2014-09-05 20:40:47 +02:00
parent fec1b02780
commit 99b37beaa4

View file

@ -53,8 +53,9 @@ postLoginR = do
hexSalted <- return $ toHex salted hexSalted <- return $ toHex salted
expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted) expected <- return $ hmacSHA1 (tokenToken token) (encodeUtf8 hexSalted)
case (fromHex' $ T.unpack hexResponse) == expected of case (fromHex' $ T.unpack hexResponse) == expected of
True -> True -> do
-- Success!! -- Success!!
runDB $ delete tokenId
return $ Right savedUserId return $ Right savedUserId
_ -> _ ->
return $ Left ("Wrong password" :: T.Text) return $ Left ("Wrong password" :: T.Text)