Skip to content

πŸ“š The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix function name

Smaug6739f4d1996b5acc
diff --git a/backend/controllers/cdn.controller.ts b/backend/controllers/cdn.controller.ts
index 76368c35..43172102 100644
--- a/backend/controllers/cdn.controller.ts
+++ b/backend/controllers/cdn.controller.ts
@@ -5,7 +5,7 @@ import { error, success } from '../utils/functions';
import type { Request, Response } from 'express';
import type { App } from '../app';
-export function convertImagetoWebp(_: App, req: Request, res: Response) {
+export function convertImageToWebp(_: App, req: Request, res: Response) {
if (typeof req.files != 'object' || !('file' in req.files) || !req.files.file[0]) {
res.status(400).json(error('No file provided.'));
return;
diff --git a/backend/routes/v1/cdn.ts b/backend/routes/v1/cdn.ts
index 73f68403..ea576e65 100644
--- a/backend/routes/v1/cdn.ts
+++ b/backend/routes/v1/cdn.ts
@@ -17,7 +17,7 @@ export default (app: App): Iroute => {
'/image',
auth,
multerCdn,
- (req: Request, res: Response) => CDNCtrl.convertImagetoWebp(app, req, res),
+ (req: Request, res: Response) => CDNCtrl.convertImageToWebp(app, req, res),
multerErrors,
);
return CDNRouter;