payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / passgen.sml
CommitLineData
4e2ac985
AC
1structure PassGen :> PASSGEN = struct
2
3open Sql Init
4
5fun lookup id =
6 let
7 val db = C.conn Config.passgenDbstring
8 in
9 (case C.oneOrNoRows db ($`SELECT pass FROM Pass WHERE id = ^(C.intToSql id)`) of
10 NONE => NONE
11 | SOME [pass] => SOME (C.stringFromSql pass)
12 | _ => raise Fail "Bad \"SELECT pass\" row")
13 before C.close db
14 end
15
16end