Add searching feature

This commit is contained in:
2025-06-08 21:53:45 +09:00
parent cd0e4065fc
commit b7f3ca6a27
16 changed files with 564 additions and 194 deletions

View File

@ -8,8 +8,8 @@ import { batchScheduler } from "./services/batch-scheduler.js";
import { config, validateConfig } from "./services/config.js";
import { closeBrowser } from "./services/content-extractor.js";
import {
deleteFeed,
deleteEpisode,
deleteFeed,
fetchAllEpisodes,
fetchEpisodesWithArticles,
getAllCategories,
@ -412,9 +412,9 @@ app.get("/api/admin/db-diagnostic", async (c) => {
} catch (error) {
console.error("Error running database diagnostic:", error);
return c.json(
{
error: "Failed to run database diagnostic",
details: error instanceof Error ? error.message : String(error)
{
error: "Failed to run database diagnostic",
details: error instanceof Error ? error.message : String(error),
},
500,
);
@ -702,14 +702,14 @@ app.get("/index.html", serveAdminIndex);
app.get("*", serveAdminIndex);
// Graceful shutdown
process.on('SIGINT', async () => {
console.log('\n🛑 Received SIGINT. Graceful shutdown...');
process.on("SIGINT", async () => {
console.log("\n🛑 Received SIGINT. Graceful shutdown...");
await closeBrowser();
process.exit(0);
});
process.on('SIGTERM', async () => {
console.log('\n🛑 Received SIGTERM. Graceful shutdown...');
process.on("SIGTERM", async () => {
console.log("\n🛑 Received SIGTERM. Graceful shutdown...");
await closeBrowser();
process.exit(0);
});