mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
refactor: rename Tool.alpha to Tool.experimental
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { z } from "zod";
|
||||
import sharp from "sharp";
|
||||
import type { FastifyInstance } from "fastify";
|
||||
import sharp from "sharp";
|
||||
import { z } from "zod";
|
||||
import { createToolRoute } from "../tool-factory.js";
|
||||
|
||||
const settingsSchema = z.object({
|
||||
@@ -26,7 +26,7 @@ export function registerSmartCrop(app: FastifyInstance) {
|
||||
.png()
|
||||
.toBuffer();
|
||||
|
||||
const outputFilename = filename.replace(/\.[^.]+$/, "") + "_smartcrop.png";
|
||||
const outputFilename = `${filename.replace(/\.[^.]+$/, "")}_smartcrop.png`;
|
||||
return { buffer: result, filename: outputFilename, contentType: "image/png" };
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user