feat(api): add /version endpoint and increment version to 0.1.25

This commit is contained in:
2026-04-27 10:19:56 +08:00
parent cd7425292c
commit 71e23dea1a
5 changed files with 456 additions and 1 deletions

View File

@@ -87,6 +87,13 @@ const ApiServer = new Elysia()
.group("/api", (app) =>
app
.use(Utils)
.get("/version", async () => {
const packageJson = await fs.readFile(
path.join(ROOT, "package.json"),
"utf-8",
);
return { version: JSON.parse(packageJson).version };
})
.use(FileStorage)
.use(LandingPage)
.use(PPID)