mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 02:45:10 +00:00
feat: add creator info middleware from MiruroAPI
- Add src/middleware/creatorInfo.js (ESM adapted) - Injects creator attribution (name, GitHub, Telegram, timestamp) into every JSON response - Updates server.js to use addCreatorInfo middleware - Updates CHANGELOG.md, README.md, and docs/architecture.md
This commit is contained in:
@@ -26,6 +26,7 @@ import { fileURLToPath } from "url";
|
||||
import { dirname } from "path";
|
||||
import { createApiRoutes } from "./src/routes/apiRoutes.js";
|
||||
import { getCacheStats } from "./src/helper/cache.helper.js";
|
||||
import { addCreatorInfo } from "./src/middleware/creatorInfo.js";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
@@ -160,6 +161,9 @@ app.get("/api/cache/stats", (req, res) => {
|
||||
res.json({ success: true, results: getCacheStats() });
|
||||
});
|
||||
|
||||
// ---- FEATURE: Creator info middleware (injects attribution into all responses) ----
|
||||
app.use(addCreatorInfo);
|
||||
|
||||
createApiRoutes(app, jsonResponse, jsonError);
|
||||
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user