瀏覽代碼

Ajout nom méthode export de validate

Arthur Brandao 5 年之前
父節點
當前提交
f0254359fe
共有 2 個文件被更改,包括 2 次插入2 次删除
  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;
 global.sqlVerbose = argv.sql >= 1;
 
 
 // Validation stockage fichier
 // Validation stockage fichier
-const validator = require('./src/validate')(config);
+const validator = require('./src/validate').getValidator(config);
 
 
 // Lancement du serveur
 // Lancement du serveur
 const server = require('./src/server');
 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) {
     if (validator === null) {
         validator = new Validate(config);
         validator = new Validate(config);
     }
     }