Fix
This commit is contained in:
12
server.ts
12
server.ts
@ -130,7 +130,7 @@ app.get("/podcast.xml", async (c) => {
|
||||
});
|
||||
|
||||
// Category-specific RSS feeds - try static file first, then generate dynamically
|
||||
app.get("/podcast/category/:category.xml", async (c) => {
|
||||
app.get("/podcast/category/:category", async (c) => {
|
||||
try {
|
||||
const category = decodeURIComponent(c.req.param("category") || "");
|
||||
if (!category) {
|
||||
@ -154,7 +154,9 @@ app.get("/podcast/category/:category.xml", async (c) => {
|
||||
}
|
||||
|
||||
// Fallback to dynamic generation
|
||||
console.log(`📄 Static category RSS not found for "${category}", generating dynamically...`);
|
||||
console.log(
|
||||
`📄 Static category RSS not found for "${category}", generating dynamically...`,
|
||||
);
|
||||
const { generateCategoryRSS } = await import("./services/podcast.js");
|
||||
const rssXml = await generateCategoryRSS(category);
|
||||
|
||||
@ -172,7 +174,7 @@ app.get("/podcast/category/:category.xml", async (c) => {
|
||||
});
|
||||
|
||||
// Feed-specific RSS feeds - try static file first, then generate dynamically
|
||||
app.get("/podcast/feed/:feedId.xml", async (c) => {
|
||||
app.get("/podcast/feed/:feedId", async (c) => {
|
||||
try {
|
||||
const feedId = c.req.param("feedId");
|
||||
if (!feedId) {
|
||||
@ -195,7 +197,9 @@ app.get("/podcast/feed/:feedId.xml", async (c) => {
|
||||
}
|
||||
|
||||
// Fallback to dynamic generation
|
||||
console.log(`📄 Static feed RSS not found for "${feedId}", generating dynamically...`);
|
||||
console.log(
|
||||
`📄 Static feed RSS not found for "${feedId}", generating dynamically...`,
|
||||
);
|
||||
const { generateFeedRSS } = await import("./services/podcast.js");
|
||||
const rssXml = await generateFeedRSS(feedId);
|
||||
|
||||
|
Reference in New Issue
Block a user