aboutsummaryrefslogtreecommitdiff
path: root/deno/mail-relay/app.ts
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-06-27 15:53:33 +0800
committerYuqian Yang <crupest@crupest.life>2025-06-27 15:53:33 +0800
commit03048eb80b6f65ab42b1fd11db9fa973c8cf4088 (patch)
tree00a49500ce650c9669c3a343c3e60fd635da9eb0 /deno/mail-relay/app.ts
parent669362832189059223d151f68df2db628d1b9217 (diff)
downloadcrupest-03048eb80b6f65ab42b1fd11db9fa973c8cf4088.tar.gz
crupest-03048eb80b6f65ab42b1fd11db9fa973c8cf4088.tar.bz2
crupest-03048eb80b6f65ab42b1fd11db9fa973c8cf4088.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.ts6
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;