diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-27 15:53:33 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-27 15:53:33 +0800 |
commit | 808d56b6195a1cdb8aea125084938529e5e29cc1 (patch) | |
tree | aeb1774dabaf8131b9f21722639ba17f50b50559 /deno/mail-relay/app.ts | |
parent | 45c188ab0d9c9a9bc812306e28f9dc8384bc1f2b (diff) | |
download | crupest-808d56b6195a1cdb8aea125084938529e5e29cc1.tar.gz crupest-808d56b6195a1cdb8aea125084938529e5e29cc1.tar.bz2 crupest-808d56b6195a1cdb8aea125084938529e5e29cc1.zip |
mail: fix s3 key not found, put this message in http response.
Diffstat (limited to 'deno/mail-relay/app.ts')
-rw-r--r-- | deno/mail-relay/app.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/deno/mail-relay/app.ts b/deno/mail-relay/app.ts index af328da..332c430 100644 --- a/deno/mail-relay/app.ts +++ b/deno/mail-relay/app.ts @@ -39,13 +39,13 @@ export function createHono(outbound: MailDeliverer, inbound: MailDeliverer) { hono.onError((err, c) => { console.error("Hono handler threw an uncaught error.", err); - return c.json({ msg: "Server error, check its log." }, 500); + return c.json({ message: "Server error, check its log." }, 500); }); hono.use(honoLogger()); hono.post("/send/raw", async (context) => { const body = await context.req.text(); if (body.trim().length === 0) { - return context.json({ msg: "Can't send an empty mail." }, 400); + return context.json({ message: "Can't send an empty mail." }, 400); } else { const result = await outbound.deliverRaw(body); return context.json({ @@ -55,7 +55,7 @@ export function createHono(outbound: MailDeliverer, inbound: MailDeliverer) { }); hono.post("/receive/raw", async (context) => { await inbound.deliverRaw(await context.req.text()); - return context.json({ msg: "Done!" }); + return context.json({ message: "Done!" }); }); return hono; |