Initial commit

This commit is contained in:
Jose Selesan
2026-04-08 22:53:11 -03:00
commit 9ae270609d
179 changed files with 28096 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
import type { AppContext } from '@/types/hono'
import { db } from '@/lib/prisma'
export async function listPlansHandler(c: AppContext) {
const plans = await db.plan.findMany({
select: {
code: true,
name: true,
price: true,
},
orderBy: {
price: 'asc',
},
})
return c.json(
plans.map((plan) => ({
code: plan.code,
name: plan.name,
price: Number(plan.price),
})),
)
}