chore: initial commit for phase06
This commit is contained in:
@@ -13,10 +13,16 @@ import {
|
||||
UpdateServerSchema,
|
||||
PowerActionSchema,
|
||||
} from './schemas.js';
|
||||
import configRoutes from './config.js';
|
||||
import pluginRoutes from './plugins.js';
|
||||
|
||||
export default async function serverRoutes(app: FastifyInstance) {
|
||||
app.addHook('onRequest', app.authenticate);
|
||||
|
||||
// Register sub-routes for config and plugins
|
||||
await app.register(configRoutes, { prefix: '/:serverId/config' });
|
||||
await app.register(pluginRoutes, { prefix: '/:serverId/plugins' });
|
||||
|
||||
// GET /api/organizations/:orgId/servers
|
||||
app.get('/', { schema: { querystring: PaginationQuerySchema } }, async (request) => {
|
||||
const { orgId } = request.params as { orgId: string };
|
||||
|
||||
Reference in New Issue
Block a user