diff options
| author | Adam Soltys <[email protected]> | 2026-02-28 14:14:30 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-28 14:14:30 -0800 |
| commit | a1632ae402d11fdd7ffc360de97c55e0b4fad677 (patch) | |
| tree | aad5a1ea73f95dcd055c1d0b4ebf2708c36b4e01 /routes/email.ts | |
| parent | 76c7e52172f3dc25ee109434157d4d982ad9d2bd (diff) | |
| download | coinos-server-a1632ae402d11fdd7ffc360de97c55e0b4fad677.tar.gz coinos-server-a1632ae402d11fdd7ffc360de97c55e0b4fad677.zip | |
migrate to hono
Diffstat (limited to 'routes/email.ts')
| -rw-r--r-- | routes/email.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routes/email.ts b/routes/email.ts index 25c90ee7..ff6ffaeb 100644 --- a/routes/email.ts +++ b/routes/email.ts @@ -6,8 +6,9 @@ import { SESClient } from "@aws-sdk/client-ses"; import { SendEmailCommand } from "@aws-sdk/client-ses"; export default { - async send({ body }, res) { + async send(c) { try { + const body = await c.req.json(); const { email, message, username, token: response } = body; const Charset = "UTF-8"; @@ -48,9 +49,9 @@ export default { }), ); - res.send({ ok: true }); + return c.json({ ok: true }); } else { - bail(res, "failed captcha"); + return bail(c, "failed captcha"); } } catch (e) { console.log(e); |
