diff --git a/services/rssapp/index.js b/services/rssapp/index.js
index 77ebb91..f6b3a88 100644
--- a/services/rssapp/index.js
+++ b/services/rssapp/index.js
@@ -7,6 +7,7 @@ import TTLCache from '@isaacs/ttlcache';
import '@dotenvx/dotenvx/config.js';
import { ApifyClient } from 'apify-client';
import { env } from './env.js';
+import packageJson from "./package.json" with { type: "json" };
const fastify = Fastify({ logger: true });
@@ -74,10 +75,22 @@ function buildFeed(username, tweets) {
return feed.xml({ indent: true });
}
+fastify.get("/", (request, reply) => {
+ return reply
+ .code(200)
+ .header("Content-Type", "text/html; charset=utf-8")
+ .send(`HELLO
THIS IS rssapp ${packageJson.version}
OK
try /projektmelody`);
+});
+
+
fastify.get("/:username", async (request, reply) => {
const { username } = request.params;
const key = username.toLowerCase();
+ if (!key) {
+ return reply.code(401).send({ error: "Username missing" });
+ }
+
if (!env.WHITELIST.has(key)) {
return reply.code(403).send({ error: "Forbidden username" });
}
diff --git a/services/rssapp/package.json b/services/rssapp/package.json
index 3864bcb..4853b07 100644
--- a/services/rssapp/package.json
+++ b/services/rssapp/package.json
@@ -1,6 +1,6 @@
{
"name": "rssapp",
- "version": "69.0.0",
+ "version": "69.0.1",
"description": "",
"main": "index.js",
"type": "module",
@@ -19,4 +19,4 @@
"rss": "^1.2.2",
"zod": "^4.1.1"
}
-}
+}
\ No newline at end of file