-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
getAllSignupAttempts :: ThentosQuery e [SignupAttempt] | ||
getAllSignupAttempts = map (\(n, cc, t) -> SignupAttempt n cc t) <$> | ||
queryT [sql| SELECT user_name, captcha_correct, timestamp FROM signup_attempts |] () | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing empty line.
otherwise looks good! |
Though I notice it's a requirement, I'm very much against adding a publicly accessible endpoint (
|
as agreed offline: let's go for the privileged-ip solution. On Tue, Dec 15, 2015 at 10:02:38AM -0800, Christian Siefkes wrote:
|
I didn't get around to doing the IP authentication. I'm unassigning myself as I'll be away for the next 2 weeks. Apart from the authentication issue, I think this is good to review/merge. |
instance FromField Bool where | ||
parseField "1" = pure True | ||
parseField "0" = pure False | ||
parseField _ = mzero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See also: haskell-hvr/cassava#107
What about using hs-logger for this? We could define a dedicated variant of logger that takes all the information on the event (signup attempt in this case), stores it to a dedicated Benefits:
|
Closing this in favour of #445 |
This is a sort of work-in-progress on https://tree.taiga.io/project/fisx-thentos/task/44
It could probably need some more tests and I'm still working on CSV output for the new api endpoint, but apart from that I think it's ready for review.