mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-28 12:04:41 +01:00
16 lines
428 B
TypeScript
16 lines
428 B
TypeScript
import { Router } from "express";
|
|
import type { Db } from "@paperclipai/db";
|
|
import { resolveHostFeatures } from "../services/host-features.js";
|
|
import { assertAuthenticated } from "./authz.js";
|
|
|
|
export function runtimeFeatureRoutes(db: Db) {
|
|
const router = Router();
|
|
|
|
router.get("/runtime-features", async (req, res) => {
|
|
assertAuthenticated(req);
|
|
res.json(await resolveHostFeatures(db));
|
|
});
|
|
|
|
return router;
|
|
}
|