diff options
| author | LLLL Colonq <llll@colonq> | 2025-06-01 19:22:00 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2025-06-01 19:22:00 -0400 |
| commit | ceba9d63df4ed5f66b4978a95bffcc90c55fc62c (patch) | |
| tree | d8f99270876045bb86acb2eedb4a2b4ce991eb7d /fig-web/src/Fig/Web/Module/Exchange.hs | |
| parent | 9a95ba1fa39102d0cd3db4da8c041593bfa3e776 (diff) | |
fig-web: Make the thing actually build
Diffstat (limited to 'fig-web/src/Fig/Web/Module/Exchange.hs')
| -rw-r--r-- | fig-web/src/Fig/Web/Module/Exchange.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fig-web/src/Fig/Web/Module/Exchange.hs b/fig-web/src/Fig/Web/Module/Exchange.hs index 3672265..941687e 100644 --- a/fig-web/src/Fig/Web/Module/Exchange.hs +++ b/fig-web/src/Fig/Web/Module/Exchange.hs @@ -18,6 +18,7 @@ import qualified Data.UUID.V4 as UUID import Fig.Web.Utils import Fig.Web.Types +import Fig.Web.Auth public :: PublicModule public a = do @@ -27,7 +28,7 @@ public a = do secure :: SecureModule secure a = do - onPost "/api/exchange" $ authed \creds -> do + onPost "/api/exchange" $ authed a \creds -> do haveCur <- formParam "haveCur" haveAmount <- formParam "haveAmount" wantCur <- formParam "wantCur" @@ -40,10 +41,10 @@ secure a = do , wantAmount = wantAmount } respondText $ decodeUtf8 key - onPost "/api/exchange/:key" $ authed \creds -> do + onPost "/api/exchange/:key" $ authed a \creds -> do key <- pathParam "key" satisfyOrder a.db.conn key creds.email - onDelete "/api/exchange/:key" $ authed \_creds -> do + onDelete "/api/exchange/:key" $ authed a \_creds -> do key <- pathParam "key" cancelOrder a.db.conn key |
