add some features

This commit is contained in:
2026-04-22 21:37:07 +02:00
parent bdd06105dd
commit c10e259ae8
20 changed files with 2101 additions and 1030 deletions
+81
View File
@@ -11,6 +11,87 @@ import { configCache } from '../services/cacheService.js';
const router = Router();
/**
* @openapi
* /api/v1/config/image-rules:
* get:
* summary: Get image validation rules
* tags:
* - Configuration
* security:
* - bearerAuth: []
* - cookieAuth: []
* responses:
* 200:
* description: Image rules configuration
* 404:
* description: Image rules not found
* put:
* summary: Update image validation rules
* tags:
* - Configuration
* security:
* - bearerAuth: []
* - cookieAuth: []
* requestBody:
* required: true
* content:
* application/json:
* schema:
* type: object
* required:
* - name
* - allowedMimeTypes
* - maxFileSizeBytes
* - maxWidthPx
* - maxHeightPx
* - jpegQuality
* - oversizeBehavior
* - maxAttachmentsPerField
* properties:
* name:
* type: string
* allowedMimeTypes:
* type: array
* items:
* type: string
* maxFileSizeBytes:
* type: integer
* maxWidthPx:
* type: integer
* maxHeightPx:
* type: integer
* jpegQuality:
* type: integer
* minimum: 1
* maximum: 100
* oversizeBehavior:
* type: string
* enum: [auto_optimize, warn_then_optimize, block]
* maxAttachmentsPerField:
* type: integer
* responses:
* 200:
* description: Image rules updated
* 400:
* description: Invalid input
* 404:
* description: Image rules not found
* /api/v1/config/export:
* get:
* summary: Get export profile configuration
* tags:
* - Configuration
* security:
* - bearerAuth: []
* - cookieAuth: []
* responses:
* 200:
* description: Export profile configuration
* 404:
* description: Export profile not found
*/
/*
* Image-rules validation is shared between server and admin frontend. The server
* acts as the final authority while the client validates proactively to give the