Commits

Luke Plant committed 75cef1a

Renamed a function

  • Participants
  • Parent commits 8a70b0c

Comments (0)

Files changed (1)

src/ConfirmCgi.hs

 import Database.HDBC (quickQuery, toSql, SqlError, commit)
 import Database.HDBC.Sqlite3 (connectSqlite3)
 
+import Random (randomRs, newStdGen)
 -- Settings
 
 sqlite_path = "/home/luke/httpd/lukeplant.me.uk/web/cgi-bin/data/addresses.db"
 -- Routing
 
 views = [ addSlashRedirectView
-        , "yes/" <+/> stringParam            //->  addEmailView    $ []
-        , "no/" <+/> stringParam             //->  removeEmailView $ []
+        , "yes/" <+/> stringParam            //->  confirmEmailView  $ []
+        , "no/" <+/> stringParam             //->  removeEmailView   $ []
         ]
 
 -- Views
 addedResponse      = message "Thanks, I'll add you to my list."
 removedResponse    = message "Thanks, you won't be added you to my list."
 
-addEmailView personid req = do
+-- -- Clickable URLs
+
+confirmEmailView personid req = do
   updated <- confirm personid
   return $ Just $ if (not updated)
                     then idNotFoundResponse
                     then idNotFoundResponse
                     else removedResponse
 
+-- -- Admin URLs
+
+
+
 -- Main
 
 main :: IO ()