brf/server/routes/api/accounts.ts
2025-12-09 12:00:39 +01:00

18 lines
400 B
TypeScript

import _ from 'lodash'
import { type FastifyPluginCallbackTypebox } from '@fastify/type-provider-typebox'
import knex from '../../lib/knex.ts'
const accountRoutes: FastifyPluginCallbackTypebox = (fastify, _, done) => {
fastify.route({
url: '/',
method: 'GET',
handler() {
return knex('account').select('*').orderBy('number')
},
})
done()
}
export default accountRoutes