Skip to content

Commit

Permalink
Merge pull request #12 from DEFRA/fix-sonarlint-issue
Browse files Browse the repository at this point in the history
fix:sonarlint issue
  • Loading branch information
daniel78uk authored Dec 1, 2023
2 parents 775e18d + 2d9f319 commit fcdf590
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions server/services/schema-validator.service.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const Ajv = require('ajv')
const addFormats = require("ajv-formats")
const addFormats = require('ajv-formats')

const validateDataAgainstSchema = (data, schema,meta) => {
const validateDataAgainstSchema = (data, schema) => {
const ajv = new Ajv({ strict: false })
addFormats(ajv)


// Compile the schema
const validate = ajv.compile(schema)

Expand All @@ -18,7 +17,6 @@ const validateDataAgainstSchema = (data, schema,meta) => {
}

return valid

}

module.exports = {
Expand Down

0 comments on commit fcdf590

Please sign in to comment.