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 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}`);
|
||||||
|
|
Loading…
Reference in New Issue