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

18 lines
404 B
TypeScript

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