import { Hono } from "hono";
import { getAllTags } from "../services/tag.service.ts";

type Env = { Variables: { db?: any } };

const app = new Hono<Env>();

app.get("/", async (c) => {
	const db = c.get("db");
	const allTags = await getAllTags(db);
	return c.json(allTags);
});

export { app as tagRoutes };
