Stage after merging with project files

This commit is contained in:
Stan
2026-04-09 19:27:10 +02:00
parent d9f0b21b10
commit 0c74a75126
25 changed files with 1120 additions and 197 deletions
+46
View File
@@ -0,0 +1,46 @@
import { Router } from 'express';
import {
getAppConfig,
getExportProfile,
getImageRules
} from '../services/configService.js';
import { asyncHandler } from '../utils/asyncHandler.js';
const router = Router();
router.get(
'/image-rules',
asyncHandler(async (_req, res) => {
const imageRules = await getImageRules();
if (!imageRules) {
return res.status(404).json({ message: 'Image rules not found.' });
}
res.json(imageRules);
})
);
router.get(
'/export',
asyncHandler(async (_req, res) => {
const exportProfile = await getExportProfile();
if (!exportProfile) {
return res.status(404).json({ message: 'Export profile not found.' });
}
res.json(exportProfile);
})
);
router.get(
'/app-config',
asyncHandler(async (_req, res) => {
const config = await getAppConfig();
res.json({ items: config });
})
);
export default router;