Skip to content

Commit

Permalink
feature: fix validation-errors.handlebars path
Browse files Browse the repository at this point in the history
  • Loading branch information
civsiv committed Mar 14, 2024
1 parent 7de7990 commit cffdb81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/openactive-broker-microservice/src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const { setUpValidatorInputs, cleanUpValidatorInputs, createAndSaveValidatorInpu
const { renderSampleOpportunities } = require('./sample-opportunities');
const { invertFacilityUseItem: invertFacilityUseItemIfPossible, createItemFromSubEvent } = require('./util/item-transforms');
const { extractJSONLDfromDatasetSiteUrl } = require('./util/extract-jsonld-utils');
const path = require('path');

/**
* @typedef {import('./models/core').OrderFeedType} OrderFeedType
Expand Down Expand Up @@ -401,7 +402,7 @@ function renderOpenValidatorHref(id) {
*/
async function renderTemplate(templateName, data) {
const getTemplate = async (name) => {
const file = await fs.readFile(`${__dirname}/templates/${name}.handlebars`, 'utf8');
const file = await fs.readFile(`${path.join(__dirname, '..')}/templates/${name}.handlebars`, 'utf8');
return Handlebars.compile(file);
};

Expand Down Expand Up @@ -1778,6 +1779,7 @@ function harvestRpdeHowLongToSleepAtFeedEnd() {
}

function harvestRpdeOnError() {
console.log('lkjhdfslkjhasdlkjfhasldkjhf')
process.exit(1);
}

Expand Down

0 comments on commit cffdb81

Please sign in to comment.