18 lines
419 B
TypeScript
18 lines
419 B
TypeScript
import _ from 'lodash'
|
|
import { Type, type Static, 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
|