Skip to content

Commit

Permalink
remove json5 import and use
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGoodall committed Oct 9, 2024
1 parent 330cc74 commit 2fa1c4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/middleware/common.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { types } from '../utils/logging.js'
import performanceDbApi from '../services/performanceDbApi.js'
import { fetchOne, FetchOptions, FetchOneFallbackPolicy, fetchMany } from './middleware.builders.js'
import * as v from 'valibot'
import json5 from 'json5'

/**
* Middleware. Set `req.handlerName` to a string that will identify
Expand Down Expand Up @@ -101,7 +100,7 @@ export const fetchSpecification = fetchOne({

export const pullOutDatasetSpecification = (req, res, next) => {
const { specification } = req
const collectionSpecifications = json5.parse(specification.json)
const collectionSpecifications = JSON.parse(specification.json)
const datasetSpecification = collectionSpecifications.find((spec) => spec.dataset === req.dataset.dataset)
req.specification = datasetSpecification
next()
Expand Down

0 comments on commit 2fa1c4e

Please sign in to comment.