работаем бля работаем
This commit is contained in:
11
server/plugins/schemas.ts
Normal file
11
server/plugins/schemas.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { FastifyPluginAsync } from 'fastify'
|
||||
import fp from 'fastify-plugin'
|
||||
import * as schemas from './schemas/index.ts'
|
||||
|
||||
const plugin: FastifyPluginAsync = fp(async (fastify) => {
|
||||
for (const schema of Object.values(schemas)) {
|
||||
fastify.addSchema(schema)
|
||||
}
|
||||
})
|
||||
|
||||
export default plugin
|
||||
Reference in New Issue
Block a user