Commit d3a4027a authored by Bryan Richter's avatar Bryan Richter

Undo change from addNonce to addToken.

parent c364f8e2
......@@ -22,7 +22,7 @@ blogSpecs = do
let getAttrs = XML.elementAttributes . XML.documentRoot . HTML.parseLBS
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
let route' = maybe (Left route) Right $ M.lookup "action" $ getAttrs form
either setUrl setUrl route'
......@@ -38,7 +38,7 @@ blogSpecs = do
let getAttrs = XML.elementAttributes . XML.documentRoot . HTML.parseLBS
withStatus 200 False $ request $ do
addToken
addNonce
setMethod "POST"
maybe (setUrl route) setUrl $ M.lookup "action" $ getAttrs form
......
......@@ -92,7 +92,7 @@ runDiscussionTest label discussion_page_url comment_url new_thread_url comment_r
get200 $ comment_rethread_url reply_comment
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl $ comment_rethread_url reply_comment
byLabel "New Parent Url" "/p/snowdrift/w/en/about/d"
......@@ -116,7 +116,7 @@ runDiscussionTest label discussion_page_url comment_url new_thread_url comment_r
get200 $ comment_rethread_url first_message
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl $ comment_rethread_url first_message
byLabel "New Parent Url" $ T.pack $ "/p/snowdrift/w/en/about/c/" ++ (\ (PersistInt64 i) -> show i) (toPersistValue second_message)
......@@ -162,7 +162,7 @@ runDiscussionTest label discussion_page_url comment_url new_thread_url comment_r
get200 $ comment_rethread_url originalId
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl $ comment_rethread_url originalId
byLabel "New Parent Url" "/p/snowdrift/w/en/intro/d"
......
......@@ -194,7 +194,7 @@ postComment route stmts = [marked|
let getAttrs = XML.elementAttributes . XML.documentRoot . HTML.parseLBS
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
maybe (setUrl route) setUrl (M.lookup "action" $ getAttrs form)
addPostParam "mode" "post"
......@@ -233,14 +233,14 @@ newWiki project language page content = do
get200 $ NewWikiR project language page
withStatus 200 False $ request $ do
addToken
addNonce
setUrl $ NewWikiR project language page
setMethod "POST"
byLabel "Page Content" content
addPostParam "mode" "preview"
withStatus 303 False $ request $ do
addToken
addNonce
setUrl $ NewWikiR project language page
setMethod "POST"
byLabel "Page Content" content
......@@ -263,7 +263,7 @@ editWiki project language page content comment = do
let last_edit = entityVal wiki_last_edit
withStatus 200 False $ request $ do
addToken
addNonce
setUrl $ WikiR project language page
setMethod "POST"
byLabel "Page Content" content
......@@ -272,7 +272,7 @@ editWiki project language page content comment = do
addPostParam "mode" "preview"
withStatus 303 False $ request $ do
addToken
addNonce
setUrl $ WikiR project language page
setMethod "POST"
byLabel "Page Content" content
......@@ -285,7 +285,7 @@ establish user_id = [marked|
get200 $ UserR user_id
withStatus 303 False $ request $ do
addToken
addNonce
setMethod "POST"
setUrl $ UserEstEligibleR user_id
byLabel "Reason" "testing"
......@@ -341,7 +341,7 @@ rethreadComment rethread_route parent_route = [marked|
get200 rethread_route
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl rethread_route
byLabel "New Parent Url" parent_route
......@@ -354,7 +354,7 @@ flagComment route = [marked|
get200 route
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl route
addPostParam "f1" "1"
......@@ -367,7 +367,7 @@ editComment route = [marked|
get200 route
withStatus 303 True $ request $ do
addToken
addNonce
setMethod "POST"
setUrl route
byLabel "Edit" "testing"
......@@ -388,7 +388,7 @@ newBlogPost page = [marked|
get200 route
withStatus 303 False $ request $ do
addToken
addNonce
setMethod "POST"
setUrl route
byLabel "Title for this blog post" "testing"
......@@ -409,7 +409,7 @@ pledge shares = [marked|
addGetParam "f1" shares
withStatus 303 False $ request $ do
addToken
addNonce
setMethod "POST"
setUrl route
addPostParam "f1" shares
......
......@@ -19,7 +19,7 @@ userSpecs = do
withStatus 303 True $ request $ do
setUrl UserCreateR
addToken
addNonce
setMethod "POST"
byLabel "Handle (private):" (username user)
byLabel "Passphrase:" (password user)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment