feat: mount /atom route in main app

This commit is contained in:
Julien Herr
2026-05-21 07:36:05 +02:00
parent b107803177
commit 1acc2f952c
+6
View File
@@ -1,6 +1,7 @@
import { Hono } from "hono"; import { Hono } from "hono";
import { handle as handleInbound } from "./routes/inbound"; import { handle as handleInbound } from "./routes/inbound";
import { handle as handleRSS } from "./routes/rss"; import { handle as handleRSS } from "./routes/rss";
import { handle as handleAtom } from "./routes/atom";
import { handle as handleAdmin } from "./routes/admin"; import { handle as handleAdmin } from "./routes/admin";
import { handle as handleEntry } from "./routes/entries"; import { handle as handleEntry } from "./routes/entries";
import { handleCloudflareEmail } from "./lib/cloudflare-email"; import { handleCloudflareEmail } from "./lib/cloudflare-email";
@@ -102,6 +103,7 @@ app.use("*", async (c, next) => {
// Group routes by functionality // Group routes by functionality
const api = new Hono(); const api = new Hono();
const rss = new Hono(); const rss = new Hono();
const atom = new Hono();
const entries = new Hono(); const entries = new Hono();
const admin = new Hono(); const admin = new Hono();
@@ -133,6 +135,9 @@ api.post("/inbound", handleInbound);
// RSS feed routes (public) // RSS feed routes (public)
rss.get("/:feedId", handleRSS); rss.get("/:feedId", handleRSS);
// Atom feed routes (public)
atom.get("/:feedId", handleAtom);
// Email entry HTML view (public) // Email entry HTML view (public)
entries.get("/:feedId/:entryId", handleEntry); entries.get("/:feedId/:entryId", handleEntry);
@@ -142,6 +147,7 @@ admin.route("/", handleAdmin);
// Mount the route groups // Mount the route groups
app.route("/api", api); app.route("/api", api);
app.route("/rss", rss); app.route("/rss", rss);
app.route("/atom", atom);
app.route("/entries", entries); app.route("/entries", entries);
app.route("/admin", admin); app.route("/admin", admin);