Parcourir la source

Ajout nom méthode export de validate

Arthur Brandao il y a 5 ans
Parent
commit
f0254359fe
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      node/main.js
  2. 1 1
      node/src/validate.js

+ 1 - 1
node/main.js

@@ -49,7 +49,7 @@ global.verbose = argv.verbose >= 1;
 global.sqlVerbose = argv.sql >= 1;
 
 // Validation stockage fichier
-const validator = require('./src/validate')(config);
+const validator = require('./src/validate').getValidator(config);
 
 // Lancement du serveur
 const server = require('./src/server');

+ 1 - 1
node/src/validate.js

@@ -58,7 +58,7 @@ class Validate {
 
 }
 
-module.exports = function (config) {
+module.exports.getValidator = function (config) {
     if (validator === null) {
         validator = new Validate(config);
     }