mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Seven tool route files using the createToolRoute factory, registering 10 API endpoints total (color adjustments covers 4 tool IDs). Also fixes the tool factory generic to properly infer Zod output types and clamps the compress binary-search quality to 1-100.
25 lines
869 B
TypeScript
25 lines
869 B
TypeScript
import type { FastifyInstance } from "fastify";
|
|
import { registerResize } from "./resize.js";
|
|
import { registerCrop } from "./crop.js";
|
|
import { registerRotate } from "./rotate.js";
|
|
import { registerConvert } from "./convert.js";
|
|
import { registerCompress } from "./compress.js";
|
|
import { registerStripMetadata } from "./strip-metadata.js";
|
|
import { registerColorAdjustments } from "./color-adjustments.js";
|
|
|
|
/**
|
|
* Registry that imports and registers all tool routes.
|
|
* Each tool uses the createToolRoute factory from tool-factory.ts.
|
|
*/
|
|
export async function registerToolRoutes(app: FastifyInstance): Promise<void> {
|
|
registerResize(app);
|
|
registerCrop(app);
|
|
registerRotate(app);
|
|
registerConvert(app);
|
|
registerCompress(app);
|
|
registerStripMetadata(app);
|
|
registerColorAdjustments(app);
|
|
|
|
app.log.info("Tool routes registered (7 tools, 10 endpoints)");
|
|
}
|