update Validation to fit current structure

This commit is contained in:
matthieu42morin 2024-03-31 05:36:31 +02:00
parent ff3f943a0d
commit 5107f756e1
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import Ajv from 'ajv';
import fs from 'fs'; import fs from 'fs';
import path from 'path'; import path from 'path';
const serviceSchema = JSON.parse(fs.readFileSync('./src/routes/sluzby/schema.json', 'utf-8')); const serviceSchema = JSON.parse(fs.readFileSync('./src/content/schema-categories.json', 'utf-8'));
function validateFile(filePath) { function validateFile(filePath) {
@ -30,7 +30,7 @@ function scanDirectory(directory) {
export function validateServices() { export function validateServices() {
try { try {
scanDirectory('./src/content/services'); scanDirectory('./src/content/');
console.log('All services validated successfully!'); console.log('All services validated successfully!');
} catch (error) { } catch (error) {
console.error(`Error validating services: ${error}`); console.error(`Error validating services: ${error}`);