14 lines
432 B
TypeScript
14 lines
432 B
TypeScript
import { FastifyInstance } from "fastify";
|
|
|
|
export default async function routes(server: FastifyInstance) {
|
|
server.get("/ping", async () => {
|
|
// Testquery gegen DB
|
|
const { data, error } = await server.supabase.from("tenants").select("id").limit(1);
|
|
|
|
return {
|
|
status: "ok",
|
|
db: error ? "not connected" : "connected",
|
|
tenant_count: data?.length ?? 0
|
|
};
|
|
});
|
|
} |