ttat 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. diff --git a/modules/xmlSychronization/index.js b/modules/xmlSychronization/index.js
  2. index fd14035..115c7c8 100644
  3. --- a/modules/xmlSychronization/index.js
  4. +++ b/modules/xmlSychronization/index.js
  5. @@ -11,7 +11,7 @@ const knex = require('../../database/db');
  6. 
  7. class XmlSyncModule extends Module {
  8. constructor(){
  9. - super('/', [2,0,3,4,0], 'XmlSync');
  10. + super();
  11. this.repository = RepositorySystem.create('Products');
  12. this.CatRepo = RepositorySystem.create('Category');
  13. this.CompRepo = RepositorySystem.create('Company');
  14. diff --git a/package.json b/package.json
  15. index 3d47d1e..402ca9c 100644
  16. --- a/package.json
  17. +++ b/package.json
  18. @@ -1,6 +1,6 @@
  19. {
  20. "name": "klapi",
  21. - "version": "0.0.1",
  22. + "version": "0.0.2",
  23. "private": true,
  24. "main": "lib/export.js",
  25. "scripts": {
  26. diff --git a/systems/RepositorySystem.js b/systems/RepositorySystem.js
  27. index df2ff66..e4a9904 100644
  28. --- a/systems/RepositorySystem.js
  29. +++ b/systems/RepositorySystem.js
  30. @@ -114,6 +114,9 @@ class Repository {
  31. if(fields[i].notNull) {
  32. column = column.notNullable();
  33. }
  34. +  if(fields[i].unique === true) {
  35. +   column = column.unique(fields[i].key);
  36. +  }
  37. if(fields[i].fk && false) {
  38. column = column
  39. .unsigned().index().references(fields[i].fk.key).inTable(fields[i].fk.table);
  40. diff --git a/systems/RoutingSystem.js b/systems/RoutingSystem.js
  41. index c90739d..f3bfed9 100644
  42. --- a/systems/RoutingSystem.js
  43. +++ b/systems/RoutingSystem.js
  44. @@ -42,7 +42,7 @@ class RoutingSystem {
  45. this.router.use(prefix, middlewares, router);
  46. return router;
  47. }
  48. -
  49. + 
  50. }
  51. 
  52. module.exports = new RoutingSystem();
  53. \ No newline at end of file