temporarily add SAPI
This commit is contained in:
parent
19f49e4a9d
commit
5622037719
9 changed files with 452 additions and 1 deletions
11
SimplyAPI/lib/Validate.js
Normal file
11
SimplyAPI/lib/Validate.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
const Ajv = require('ajv')
|
||||
const ajv = new Ajv()
|
||||
|
||||
class Validate {
|
||||
static validateSchema = async (schema, body) => {
|
||||
const validate = ajv.compile(schema)
|
||||
return validate(body)
|
||||
|
||||
}
|
||||
}
|
||||
module.exports = Validate
|
||||
Loading…
Add table
Add a link
Reference in a new issue