update Validation to fit current structure
This commit is contained in:
parent
ff3f943a0d
commit
5107f756e1
|
@ -2,7 +2,7 @@ import Ajv from 'ajv';
|
|||
import fs from 'fs';
|
||||
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) {
|
||||
|
@ -30,7 +30,7 @@ function scanDirectory(directory) {
|
|||
|
||||
export function validateServices() {
|
||||
try {
|
||||
scanDirectory('./src/content/services');
|
||||
scanDirectory('./src/content/');
|
||||
console.log('All services validated successfully!');
|
||||
} catch (error) {
|
||||
console.error(`Error validating services: ${error}`);
|
||||
|
|
Loading…
Reference in New Issue