Explorar o código

Ajout nom méthode export de validate

Arthur Brandao %!s(int64=5) %!d(string=hai) anos
pai
achega
f0254359fe
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  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);
     }