mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.0 KiB
27 lines
1.0 KiB
import type { FastifyInstance } from 'fastify'
|
|
|
|
/**
|
|
* API Routes
|
|
*/
|
|
async function routes(app: FastifyInstance) {
|
|
// Register schemas
|
|
await import('./schemas/block.ts').then((m) => m.registerSchemas(app))
|
|
await import('./schemas/group.ts').then((m) => m.registerSchemas(app))
|
|
await import('./schemas/mail.ts').then((m) => m.registerSchemas(app))
|
|
await import('./schemas/site.ts').then((m) => m.registerSchemas(app))
|
|
await import('./schemas/user.ts').then((m) => m.registerSchemas(app))
|
|
|
|
// Register routes
|
|
app.register(import('./authentication.ts'))
|
|
app.register(import('./blocks.ts'))
|
|
app.register(import('./groups.ts'), { prefix: '/groups' })
|
|
app.register(import('./locales.ts'), { prefix: '/locales' })
|
|
app.register(import('./mail.ts'), { prefix: '/mail' })
|
|
app.register(import('./pages.ts'))
|
|
app.register(import('./sites.ts'), { prefix: '/sites' })
|
|
app.register(import('./system.ts'), { prefix: '/system' })
|
|
app.register(import('./users.ts'), { prefix: '/users' })
|
|
}
|
|
|
|
export default routes
|