intento de confirmacion, aun pendiente
This commit is contained in:
@@ -6,15 +6,7 @@ DB_PASSWORD=password
|
||||
DB_NAME=cedetec_proyectos
|
||||
DB_PORT=3306
|
||||
|
||||
|
||||
SALT_ROUNDS = 10
|
||||
|
||||
KEY =
|
||||
CADUCIDAD_TOKEN = 1800000
|
||||
|
||||
TOKEN_KEY =
|
||||
TOKEN_EXPIRATION = 1800000
|
||||
|
||||
|
||||
EMAIL=
|
||||
EMAIL_PASS=
|
||||
DB_HOST_DSC = 132.248.180.82
|
||||
DB_USER_DSC = sites_user
|
||||
DB_PASS_DSC = F0rTest
|
||||
DB_NAME_DSC = sat
|
||||
+3
-1
@@ -32,4 +32,6 @@ lerna-debug.log*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
.env
|
||||
Generated
+230
-4
@@ -21,6 +21,7 @@
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.0",
|
||||
"moment": "^2.29.4",
|
||||
"mysql2": "^3.1.2",
|
||||
"passport": "^0.6.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"passport-local": "^1.0.0",
|
||||
@@ -28,6 +29,7 @@
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "^7.2.0",
|
||||
"swagger-ui-express": "^4.6.1",
|
||||
"sybase": "^1.2.3",
|
||||
"typeorm": "^0.3.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -3817,6 +3819,14 @@
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
|
||||
},
|
||||
"node_modules/denque": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/depd": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||
@@ -4853,6 +4863,14 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/generate-function": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
||||
"dependencies": {
|
||||
"is-property": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
|
||||
@@ -5349,6 +5367,11 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/is-property": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
|
||||
},
|
||||
"node_modules/is-stream": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
|
||||
@@ -6365,6 +6388,29 @@
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonparse": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
||||
"integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==",
|
||||
"engines": [
|
||||
"node >= 0.2.0"
|
||||
]
|
||||
},
|
||||
"node_modules/JSONStream": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
|
||||
"integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
|
||||
"dependencies": {
|
||||
"jsonparse": "^1.2.0",
|
||||
"through": ">=2.2.7 <3"
|
||||
},
|
||||
"bin": {
|
||||
"JSONStream": "bin.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/jsonwebtoken": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
||||
@@ -6514,6 +6560,11 @@
|
||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/long": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
|
||||
"integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
@@ -6786,6 +6837,43 @@
|
||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/mysql2": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.1.2.tgz",
|
||||
"integrity": "sha512-NXz6sUvHSEOKz1jv3koSga7eb2dHrwD/mnPmqbbZzMRvjQcSpb0Eh0ectWyYt1U60CLlEbjoA3XYjjbbReRF5Q==",
|
||||
"dependencies": {
|
||||
"denque": "^2.1.0",
|
||||
"generate-function": "^2.3.1",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"long": "^5.2.1",
|
||||
"lru-cache": "^7.14.1",
|
||||
"named-placeholders": "^1.1.3",
|
||||
"seq-queue": "^0.0.5",
|
||||
"sqlstring": "^2.3.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mysql2/node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"dependencies": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mysql2/node_modules/lru-cache": {
|
||||
"version": "7.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.1.tgz",
|
||||
"integrity": "sha512-8/HcIENyQnfUTCDizRu9rrDyG6XG/21M4X7/YEGZeD76ZJilFPAUVb/2zysFf7VVO1LEjCDFyHp8pMMvozIrvg==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/mz": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||
@@ -6796,6 +6884,25 @@
|
||||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/named-placeholders": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
|
||||
"integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
|
||||
"dependencies": {
|
||||
"lru-cache": "^7.14.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/named-placeholders/node_modules/lru-cache": {
|
||||
"version": "7.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.1.tgz",
|
||||
"integrity": "sha512-8/HcIENyQnfUTCDizRu9rrDyG6XG/21M4X7/YEGZeD76ZJilFPAUVb/2zysFf7VVO1LEjCDFyHp8pMMvozIrvg==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
@@ -7997,6 +8104,11 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
||||
},
|
||||
"node_modules/seq-queue": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
|
||||
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
|
||||
},
|
||||
"node_modules/serialize-javascript": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
|
||||
@@ -8162,6 +8274,14 @@
|
||||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sqlstring": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
|
||||
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/stack-utils": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
|
||||
@@ -8367,6 +8487,14 @@
|
||||
"express": ">=4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/sybase": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/sybase/-/sybase-1.2.3.tgz",
|
||||
"integrity": "sha512-69dtkzLPjWLQknP0x6gGud9WKZs7Ujdo8EEl4nwN/fhLrgXsgMxbGkT2rQfdw1kg2lbJvbpBSbA2vm0rWRxs6g==",
|
||||
"dependencies": {
|
||||
"JSONStream": "latest"
|
||||
}
|
||||
},
|
||||
"node_modules/symbol-observable": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz",
|
||||
@@ -8546,8 +8674,7 @@
|
||||
"node_modules/through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
|
||||
},
|
||||
"node_modules/tmp": {
|
||||
"version": "0.0.33",
|
||||
@@ -12392,6 +12519,11 @@
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ=="
|
||||
},
|
||||
"denque": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
|
||||
"integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw=="
|
||||
},
|
||||
"depd": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
||||
@@ -13188,6 +13320,14 @@
|
||||
"wide-align": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"generate-function": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
|
||||
"integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
|
||||
"requires": {
|
||||
"is-property": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"gensync": {
|
||||
"version": "1.0.0-beta.2",
|
||||
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
|
||||
@@ -13537,6 +13677,11 @@
|
||||
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
|
||||
"dev": true
|
||||
},
|
||||
"is-property": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
|
||||
"integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="
|
||||
},
|
||||
"is-stream": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
|
||||
@@ -14310,6 +14455,20 @@
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"jsonparse": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
|
||||
"integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg=="
|
||||
},
|
||||
"JSONStream": {
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
|
||||
"integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
|
||||
"requires": {
|
||||
"jsonparse": "^1.2.0",
|
||||
"through": ">=2.2.7 <3"
|
||||
}
|
||||
},
|
||||
"jsonwebtoken": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz",
|
||||
@@ -14427,6 +14586,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"long": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
|
||||
"integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
@@ -14631,6 +14795,36 @@
|
||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
|
||||
"dev": true
|
||||
},
|
||||
"mysql2": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.1.2.tgz",
|
||||
"integrity": "sha512-NXz6sUvHSEOKz1jv3koSga7eb2dHrwD/mnPmqbbZzMRvjQcSpb0Eh0ectWyYt1U60CLlEbjoA3XYjjbbReRF5Q==",
|
||||
"requires": {
|
||||
"denque": "^2.1.0",
|
||||
"generate-function": "^2.3.1",
|
||||
"iconv-lite": "^0.6.3",
|
||||
"long": "^5.2.1",
|
||||
"lru-cache": "^7.14.1",
|
||||
"named-placeholders": "^1.1.3",
|
||||
"seq-queue": "^0.0.5",
|
||||
"sqlstring": "^2.3.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
||||
"requires": {
|
||||
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
||||
}
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "7.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.1.tgz",
|
||||
"integrity": "sha512-8/HcIENyQnfUTCDizRu9rrDyG6XG/21M4X7/YEGZeD76ZJilFPAUVb/2zysFf7VVO1LEjCDFyHp8pMMvozIrvg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"mz": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||
@@ -14641,6 +14835,21 @@
|
||||
"thenify-all": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"named-placeholders": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz",
|
||||
"integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==",
|
||||
"requires": {
|
||||
"lru-cache": "^7.14.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"lru-cache": {
|
||||
"version": "7.18.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.1.tgz",
|
||||
"integrity": "sha512-8/HcIENyQnfUTCDizRu9rrDyG6XG/21M4X7/YEGZeD76ZJilFPAUVb/2zysFf7VVO1LEjCDFyHp8pMMvozIrvg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
@@ -15517,6 +15726,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"seq-queue": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz",
|
||||
"integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="
|
||||
},
|
||||
"serialize-javascript": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
|
||||
@@ -15650,6 +15864,11 @@
|
||||
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
|
||||
"dev": true
|
||||
},
|
||||
"sqlstring": {
|
||||
"version": "2.3.3",
|
||||
"resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz",
|
||||
"integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg=="
|
||||
},
|
||||
"stack-utils": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
|
||||
@@ -15801,6 +16020,14 @@
|
||||
"swagger-ui-dist": ">=4.11.0"
|
||||
}
|
||||
},
|
||||
"sybase": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/sybase/-/sybase-1.2.3.tgz",
|
||||
"integrity": "sha512-69dtkzLPjWLQknP0x6gGud9WKZs7Ujdo8EEl4nwN/fhLrgXsgMxbGkT2rQfdw1kg2lbJvbpBSbA2vm0rWRxs6g==",
|
||||
"requires": {
|
||||
"JSONStream": "latest"
|
||||
}
|
||||
},
|
||||
"symbol-observable": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz",
|
||||
@@ -15929,8 +16156,7 @@
|
||||
"through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
|
||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="
|
||||
},
|
||||
"tmp": {
|
||||
"version": "0.0.33",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"class-transformer": "^0.5.1",
|
||||
"class-validator": "^0.14.0",
|
||||
"moment": "^2.29.4",
|
||||
"mysql2": "^3.1.2",
|
||||
"passport": "^0.6.0",
|
||||
"passport-jwt": "^4.0.1",
|
||||
"passport-local": "^1.0.0",
|
||||
@@ -39,6 +40,7 @@
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rxjs": "^7.2.0",
|
||||
"swagger-ui-express": "^4.6.1",
|
||||
"sybase": "^1.2.3",
|
||||
"typeorm": "^0.3.12"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
INSERT INTO usuario (nombre, password, email) VALUES("jorge", "Canela1108", "admin@unam.com");
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ActividadController } from './actividad.controller';
|
||||
|
||||
describe('ActividadController', () => {
|
||||
let controller: ActividadController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [ActividadController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<ActividadController>(ActividadController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('actividad')
|
||||
export class ActividadController {}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ActividadController } from './actividad.controller';
|
||||
import { ActividadService } from './actividad.service';
|
||||
|
||||
@Module({
|
||||
controllers: [ActividadController],
|
||||
providers: [ActividadService]
|
||||
})
|
||||
export class ActividadModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ActividadService } from './actividad.service';
|
||||
|
||||
describe('ActividadService', () => {
|
||||
let service: ActividadService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [ActividadService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<ActividadService>(ActividadService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class ActividadService {}
|
||||
+39
-1
@@ -32,6 +32,19 @@ import { Area } from './catalogos/area.entity';
|
||||
import { TipoMiembro } from './catalogos/tipo-miembro.entity';
|
||||
import { Carrera } from './catalogos/carrera.entity';
|
||||
import { Periodo } from './periodo/entity/periodo.entity';
|
||||
import { MiembroProyectoModule } from './miembro-proyecto/miembro-proyecto.module';
|
||||
import { MiembroContactoModule } from './miembro-contacto/miembro-contacto.module';
|
||||
import { ProyectoModule } from './proyecto/proyecto.module';
|
||||
import { ProyectoActividadModule } from './proyecto-actividad/proyecto-actividad.module';
|
||||
import { ActividadModule } from './actividad/actividad.module';
|
||||
import { MiembroProyecto } from './miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import { MiembroContacto } from './miembro-contacto/entity/miembro_contacto.entity';
|
||||
import { Proyecto } from './proyecto/entity/proyecto.entity';
|
||||
import { Contacto } from './contacto/entity/contacto.entity';
|
||||
import { Equipo } from './equipo/entity/equipo.entity';
|
||||
import { EquipoEvento } from './equipo-evento/entity/equipo_evento.entity';
|
||||
import { EquipoMiembro } from './equipo-miembro/entity/equipo_miembro.entity';
|
||||
import { SybaseModule } from './sybase/sybase.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -54,6 +67,7 @@ import { Periodo } from './periodo/entity/periodo.entity';
|
||||
Participante,
|
||||
EventoParticipante,
|
||||
Usuario,
|
||||
/* Agregadas el 29 de febrero */
|
||||
Miembro,
|
||||
InscripcionArea,
|
||||
InscripcionDSC,
|
||||
@@ -62,11 +76,30 @@ import { Periodo } from './periodo/entity/periodo.entity';
|
||||
Area,
|
||||
TipoMiembro,
|
||||
Carrera,
|
||||
Periodo
|
||||
Periodo,
|
||||
/* Agregadas el 1 de marzo */
|
||||
MiembroProyecto,
|
||||
MiembroContacto,
|
||||
Proyecto,
|
||||
Contacto,
|
||||
Equipo,
|
||||
EquipoEvento,
|
||||
EquipoMiembro,
|
||||
],
|
||||
synchronize: true,
|
||||
}),
|
||||
}),
|
||||
SybaseModule.forRootAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (configService: ConfigService) => {
|
||||
return {
|
||||
host: configService.get('DB_HOST_DSC'),
|
||||
database: configService.get('DB_NAME_DSC'),
|
||||
username: configService.get('DB_USER_DSC'),
|
||||
password: configService.get('DB_PASS_DSC'),
|
||||
};
|
||||
},
|
||||
}),
|
||||
EventosModule,
|
||||
ParticipanteModule,
|
||||
EventoParticipanteModule,
|
||||
@@ -80,6 +113,11 @@ import { Periodo } from './periodo/entity/periodo.entity';
|
||||
PeriodoModule,
|
||||
InscripcionUsuarioModule,
|
||||
MiembroModule,
|
||||
MiembroProyectoModule,
|
||||
MiembroContactoModule,
|
||||
ProyectoModule,
|
||||
ProyectoActividadModule,
|
||||
ActividadModule,
|
||||
],
|
||||
controllers: [
|
||||
AppController,
|
||||
|
||||
@@ -47,11 +47,11 @@ export class AuthService {
|
||||
|
||||
if (!checkPassword) throw new HttpException('Contraseña incorrecta', 403);
|
||||
|
||||
const payload = { id_usuario: usuario.id_usuario, name: usuario.name };
|
||||
const payload = { id_usuario: usuario.id_usuario, name: usuario.nombre };
|
||||
const token = this.jwtService.sign(payload); //firma el token
|
||||
|
||||
const data = {
|
||||
usuario: usuario.name,
|
||||
usuario: usuario.nombre,
|
||||
id: usuario.id_usuario,
|
||||
email: usuario.email,
|
||||
token,
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import * as mysql from 'mysql2/promise';
|
||||
|
||||
@Injectable()
|
||||
export class MysqlService {
|
||||
private mysqlPool: mysql.Pool;
|
||||
private mysqlConnection: mysql.Connection;
|
||||
private mysqlConnectionDscConfirmation: mysql.Connection;
|
||||
|
||||
constructor() {
|
||||
/* this.mysqlPool = mysql.createPool({
|
||||
connectionLimit: 20,
|
||||
host: process.env.DB_HOST,
|
||||
user: process.env.DB_USER,
|
||||
password: process.env.DB_PASS,
|
||||
database: process.env.DB_NAME,
|
||||
});
|
||||
|
||||
this.mysqlConnection = mysql.createConnection({
|
||||
host: process.env.DB_HOST,
|
||||
user: process.env.DB_USER,
|
||||
password: process.env.DB_PASS,
|
||||
database: process.env.DB_NAME,
|
||||
});
|
||||
|
||||
this.mysqlConnectionDscConfirmation = mysql.createPool({
|
||||
connectionLimit: 20,
|
||||
host: process.env.DB_HOST_DSC,
|
||||
user: process.env.DB_USER_DSC,
|
||||
password: process.env.DB_PASS_DSC,
|
||||
database: process.env.DB_NAME_DSC,
|
||||
}); */
|
||||
|
||||
/* this.mysqlConnection.connect((err) => {
|
||||
if (err) console.log(err);
|
||||
else console.log('base conectada');
|
||||
}); */
|
||||
}
|
||||
|
||||
getMysqlConnection(): mysql.Connection {
|
||||
return this.mysqlConnection;
|
||||
}
|
||||
|
||||
getMysqlPool(): mysql.Pool {
|
||||
return this.mysqlPool;
|
||||
}
|
||||
|
||||
getMysqlConnectionDscConfirmation(): mysql.Connection {
|
||||
return this.mysqlConnectionDscConfirmation;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { MiembroContacto } from "src/miembro-contacto/entity/miembro_contacto.entity";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
|
||||
@Entity()
|
||||
export class Contacto {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_contacto: number
|
||||
|
||||
@Column({nullable:false})
|
||||
correo: string
|
||||
|
||||
@Column()
|
||||
horario: string
|
||||
|
||||
@Column({nullable:true})
|
||||
facebook: string
|
||||
|
||||
@Column({nullable: true})
|
||||
linkedin: string
|
||||
|
||||
@ManyToOne(
|
||||
() => MiembroContacto, (miembroContacto) => miembroContacto.contacto
|
||||
)
|
||||
@JoinColumn({name: "id_contacto"})
|
||||
miembroContacto: MiembroContacto
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Equipo } from "src/equipo/entity/equipo.entity";
|
||||
import { Evento } from "src/eventos/evento.entity";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class EquipoEvento {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_equipo_evento: number
|
||||
|
||||
@Column()
|
||||
id_equipo: number
|
||||
|
||||
@Column()
|
||||
id_evento: number
|
||||
|
||||
@ManyToOne(
|
||||
() => Equipo, (equipo) => equipo.equipoEvento
|
||||
)
|
||||
@JoinColumn({name: "id_equipo"})
|
||||
equipo: Equipo[]
|
||||
|
||||
@ManyToOne(
|
||||
() => Evento, (evento) => evento.equipoEvento
|
||||
)
|
||||
@JoinColumn({name: "id_evento"})
|
||||
evento: Evento
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { Equipo } from "src/equipo/entity/equipo.entity";
|
||||
import { Miembro } from "src/miembro/entity/miembro.entity";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class EquipoMiembro {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_equipo_miembro:number
|
||||
|
||||
@Column()
|
||||
id_equipo:number
|
||||
|
||||
@Column()
|
||||
id_miembro:number
|
||||
|
||||
@ManyToOne(
|
||||
() => Miembro, (miembro) => miembro.equipoMiembro
|
||||
)
|
||||
@JoinColumn({name:"id_miembro"})
|
||||
miembro: Miembro[]
|
||||
|
||||
@ManyToOne(
|
||||
() => Equipo,(equipo) => equipo.equipoMiembro
|
||||
)
|
||||
@JoinColumn({name: "id_equipo"})
|
||||
equipo: Equipo[]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { EquipoEvento } from "src/equipo-evento/entity/equipo_evento.entity";
|
||||
import { EquipoMiembro } from "src/equipo-miembro/entity/equipo_miembro.entity";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class Equipo{
|
||||
@PrimaryGeneratedColumn()
|
||||
id_equipo: number
|
||||
|
||||
@Column({length:50, nullable:true})
|
||||
nombre: string
|
||||
|
||||
@Column({length:250})
|
||||
descripcion:string
|
||||
|
||||
@OneToMany(
|
||||
() => EquipoMiembro, (equipoMiembro) => equipoMiembro.miembro
|
||||
)
|
||||
equipoMiembro: EquipoMiembro
|
||||
|
||||
@OneToMany(
|
||||
() => EquipoEvento, (equipoEvento) => equipoEvento.evento
|
||||
)
|
||||
equipoEvento: EquipoEvento
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
import { EquipoEvento } from 'src/equipo-evento/entity/equipo_evento.entity';
|
||||
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
@@ -68,4 +70,10 @@ export class Evento {
|
||||
(eventoParticipante) => eventoParticipante.evento,
|
||||
)
|
||||
eventoParticipantes: EventoParticipante[];
|
||||
|
||||
@OneToMany(
|
||||
() => EquipoEvento, (equipoEvento) => equipoEvento.evento
|
||||
)
|
||||
equipoEvento: EquipoEvento
|
||||
|
||||
}
|
||||
|
||||
@@ -26,5 +26,6 @@ export class InscripcionArea {
|
||||
@ManyToOne(
|
||||
() => InscripcionDSC, (inscripcionDsc) => inscripcionDsc.inscripcionArea
|
||||
)
|
||||
@JoinColumn({name:"id_inscripcion"})
|
||||
inscripcionDsc: InscripcionDSC
|
||||
}
|
||||
|
||||
@@ -1,4 +1,74 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Get,
|
||||
Param,
|
||||
ParseIntPipe,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import { InscripcionDscService } from './inscripcion-dsc.service';
|
||||
|
||||
@Controller('inscripcion-dsc')
|
||||
export class InscripcionDscController {}
|
||||
export class InscripcionDscController {
|
||||
constructor(private readonly inscripcionService: InscripcionDscService) {}
|
||||
|
||||
@Post('confirmacion')
|
||||
async confirmacionDsc(@Body() body: any) {
|
||||
const { accountNumber } = body;
|
||||
|
||||
/* this.inscripcionService
|
||||
.userVerification({ accountNumber })
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
.catch((err) => {
|
||||
return(err)
|
||||
}); */
|
||||
|
||||
try {
|
||||
const userVerificationResponse =
|
||||
await this.inscripcionService.userVerification({
|
||||
accountNumber,
|
||||
});
|
||||
console.log(userVerificationResponse)
|
||||
if (userVerificationResponse.length === 0) {
|
||||
return {
|
||||
error: true,
|
||||
msj: 'El usuario no se encuentra inscrito',
|
||||
desc: '',
|
||||
};
|
||||
}
|
||||
const [userInformation] = userVerificationResponse;
|
||||
console.log(userInformation);
|
||||
if (userInformation.confirmacion) {
|
||||
return {
|
||||
error: true,
|
||||
msj: 'El usuario ya hizo la confirmación anteriormente',
|
||||
desc: '',
|
||||
};
|
||||
}
|
||||
} catch (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
try {
|
||||
const confirmationResponse =
|
||||
await this.inscripcionService.userConfirmation({ accountNumber });
|
||||
return {
|
||||
error: false,
|
||||
msj: 'Usuario confirmado exitosamente',
|
||||
data: confirmationResponse,
|
||||
};
|
||||
} catch (err) {
|
||||
return {
|
||||
error: true,
|
||||
msj: `No se pudo realizar la confirmación del usuario`,
|
||||
desc: `${err}`,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/* @Get(":id")
|
||||
getUsuarioById(@Param('id', ParseIntPipe)id: number){
|
||||
|
||||
} */
|
||||
}
|
||||
|
||||
@@ -1,4 +1,64 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { SybaseService } from 'src/sybase/sybase.service';
|
||||
|
||||
@Injectable()
|
||||
export class InscripcionDscService {}
|
||||
export class InscripcionDscService {
|
||||
constructor(private sybaseService: SybaseService) {}
|
||||
|
||||
async userVerification(data: { accountNumber: string }): Promise<any> {
|
||||
const { accountNumber } = data;
|
||||
/* console.log(accountNumber) */
|
||||
|
||||
try {
|
||||
|
||||
this.validarNumeroCuenta(accountNumber); //valida que el numero de cuenta sea string y menor a 9 digitos
|
||||
|
||||
} catch (error) {
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
const userInformationQuery = `SELECT A.id_cuenta, nombre, if(AI.platica=true,1,0) as confirmacion FROM alumno A
|
||||
JOIN alumno_inscrito AI ON (A.id_cuenta = AI.id_cuenta)
|
||||
JOIN periodo P ON (P.id_periodo = AI.id_periodo)
|
||||
WHERE A.id_cuenta = "${accountNumber}" and P.activo=true`;
|
||||
|
||||
try {
|
||||
const responseUserInformation = await this.sybaseService.queryDsc(
|
||||
userInformationQuery,
|
||||
);
|
||||
console.log(responseUserInformation)
|
||||
return responseUserInformation;
|
||||
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
validarNumeroCuenta = (numeroCuenta) => {
|
||||
if (typeof numeroCuenta !== 'string' || numeroCuenta.length > 9)
|
||||
return numeroCuenta;
|
||||
};
|
||||
|
||||
async userConfirmation(data: { accountNumber: string }): Promise<any> {
|
||||
const { accountNumber } = data;
|
||||
|
||||
try {
|
||||
this.validarNumeroCuenta(accountNumber);
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
let userConfirmationQuery = `UPDATE alumno_inscrito SET platica=true
|
||||
WHERE id_cuenta="${accountNumber}" and id_periodo=(SELECT id_periodo FROM periodo WHERE activo=true)`;
|
||||
|
||||
try {
|
||||
const responseUserConfirmation = await this.sybaseService.queryDsc(
|
||||
userConfirmationQuery,
|
||||
);
|
||||
return responseUserConfirmation;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ export class InscripcionUsuario {
|
||||
id_inscripcion_usuario: number
|
||||
|
||||
@Column({nullable: false})
|
||||
id_usuario: number
|
||||
id_miembro: number
|
||||
|
||||
@Column({nullable: false})
|
||||
id_inscripcion: number
|
||||
@@ -23,7 +23,7 @@ export class InscripcionUsuario {
|
||||
@ManyToOne(
|
||||
() => Miembro, (miebro) => miebro.inscripcionUsuario
|
||||
)
|
||||
@JoinColumn({name: "id_usuario"})
|
||||
@JoinColumn({name: "id_miembro"})
|
||||
miembro: Miembro[]
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Contacto } from "src/contacto/entity/contacto.entity";
|
||||
import { Miembro } from "src/miembro/entity/miembro.entity";
|
||||
import { Column, Entity, JoinColumn, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class MiembroContacto {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_miembro_contacto: number
|
||||
|
||||
@Column()
|
||||
id_miembro: number
|
||||
|
||||
@Column()
|
||||
id_contacto: number
|
||||
|
||||
@OneToMany(
|
||||
() => Miembro, (miembro) => miembro.miembroContacto
|
||||
)
|
||||
miembro: Miembro[]
|
||||
|
||||
@OneToMany(
|
||||
() => Contacto, (contacto) => contacto.miembroContacto
|
||||
)
|
||||
@JoinColumn({name: "id_contacto"})
|
||||
contacto: Contacto
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MiembroContactoController } from './miembro-contacto.controller';
|
||||
|
||||
describe('MiembroContactoController', () => {
|
||||
let controller: MiembroContactoController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [MiembroContactoController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<MiembroContactoController>(MiembroContactoController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('miembro-contacto')
|
||||
export class MiembroContactoController {}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { MiembroContactoController } from './miembro-contacto.controller';
|
||||
import { MiembroContactoService } from './miembro-contacto.service';
|
||||
|
||||
@Module({
|
||||
controllers: [MiembroContactoController],
|
||||
providers: [MiembroContactoService]
|
||||
})
|
||||
export class MiembroContactoModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MiembroContactoService } from './miembro-contacto.service';
|
||||
|
||||
describe('MiembroContactoService', () => {
|
||||
let service: MiembroContactoService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [MiembroContactoService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<MiembroContactoService>(MiembroContactoService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class MiembroContactoService {}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Miembro } from "src/miembro/entity/miembro.entity";
|
||||
import { Proyecto } from "src/proyecto/entity/proyecto.entity";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn } from "typeorm";
|
||||
|
||||
@Entity()
|
||||
export class MiembroProyecto {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_miembro_proyecto: number
|
||||
|
||||
@Column()
|
||||
id_proyecto: number
|
||||
|
||||
@Column()
|
||||
id_miembro: number
|
||||
|
||||
@ManyToOne(
|
||||
() => Miembro, (miembro) => miembro.miembroProyecto
|
||||
)
|
||||
@JoinColumn({name: "id_miembro"})
|
||||
miembro: Miembro[]
|
||||
|
||||
@OneToMany(
|
||||
() => Proyecto, (proyecto) => proyecto.miembroProyecto
|
||||
)
|
||||
proyecto: Proyecto[]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MiembroProyectoController } from './miembro-proyecto.controller';
|
||||
|
||||
describe('MiembroProyectoController', () => {
|
||||
let controller: MiembroProyectoController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [MiembroProyectoController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<MiembroProyectoController>(MiembroProyectoController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('miembro-proyecto')
|
||||
export class MiembroProyectoController {}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { MiembroProyectoController } from './miembro-proyecto.controller';
|
||||
import { MiembroProyectoService } from './miembro-proyecto.service';
|
||||
|
||||
@Module({
|
||||
controllers: [MiembroProyectoController],
|
||||
providers: [MiembroProyectoService]
|
||||
})
|
||||
export class MiembroProyectoModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { MiembroProyectoService } from './miembro-proyecto.service';
|
||||
|
||||
describe('MiembroProyectoService', () => {
|
||||
let service: MiembroProyectoService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [MiembroProyectoService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<MiembroProyectoService>(MiembroProyectoService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class MiembroProyectoService {}
|
||||
@@ -1,7 +1,10 @@
|
||||
import { IsEmail } from 'class-validator';
|
||||
import { Carrera } from 'src/catalogos/carrera.entity';
|
||||
import { TipoMiembro } from 'src/catalogos/tipo-miembro.entity';
|
||||
import { EquipoMiembro } from 'src/equipo-miembro/entity/equipo_miembro.entity';
|
||||
import { InscripcionUsuario } from 'src/inscripcion-usuario/entity/inscripcion_usuario.entity';
|
||||
import { MiembroContacto } from 'src/miembro-contacto/entity/miembro_contacto.entity';
|
||||
import { MiembroProyecto } from 'src/miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
@@ -14,7 +17,7 @@ import {
|
||||
@Entity()
|
||||
export class Miembro {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_usuario: number;
|
||||
id_miembro: number;
|
||||
|
||||
@Column({ nullable: false, length: 50 })
|
||||
nombre: string;
|
||||
@@ -60,4 +63,20 @@ export class Miembro {
|
||||
@ManyToOne(() => Carrera, (carrera) => carrera.miembro)
|
||||
@JoinColumn({ name: 'id_carrera' })
|
||||
carrera: Carrera;
|
||||
|
||||
@ManyToOne(
|
||||
() => MiembroContacto, (miembroContacto) => miembroContacto.miembro
|
||||
)
|
||||
@JoinColumn({name: "id_miembro"})
|
||||
miembroContacto: MiembroContacto
|
||||
|
||||
@OneToMany(
|
||||
() => MiembroProyecto, (miembroProyecto) => miembroProyecto.miembro
|
||||
)
|
||||
miembroProyecto: MiembroProyecto
|
||||
|
||||
@OneToMany(
|
||||
() => EquipoMiembro, (equipoMiembro) => equipoMiembro.miembro
|
||||
)
|
||||
equipoMiembro: EquipoMiembro
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ProyectoActividadController } from './proyecto-actividad.controller';
|
||||
|
||||
describe('ProyectoActividadController', () => {
|
||||
let controller: ProyectoActividadController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [ProyectoActividadController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<ProyectoActividadController>(ProyectoActividadController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('proyecto-actividad')
|
||||
export class ProyectoActividadController {}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ProyectoActividadController } from './proyecto-actividad.controller';
|
||||
import { ProyectoActividadService } from './proyecto-actividad.service';
|
||||
|
||||
@Module({
|
||||
controllers: [ProyectoActividadController],
|
||||
providers: [ProyectoActividadService]
|
||||
})
|
||||
export class ProyectoActividadModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ProyectoActividadService } from './proyecto-actividad.service';
|
||||
|
||||
describe('ProyectoActividadService', () => {
|
||||
let service: ProyectoActividadService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [ProyectoActividadService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<ProyectoActividadService>(ProyectoActividadService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class ProyectoActividadService {}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { MiembroProyecto } from 'src/miembro-proyecto/entity/miembro_proyecto.entity';
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
export class Proyecto {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_proyecto: number;
|
||||
|
||||
@Column({ length: 50 })
|
||||
nombre: string;
|
||||
|
||||
@Column()
|
||||
activo: boolean;
|
||||
|
||||
@Column({ length: 200 })
|
||||
mision: string;
|
||||
|
||||
@Column({ length: 200 })
|
||||
vision: string;
|
||||
|
||||
@Column({ length: 200 })
|
||||
descripcion: string;
|
||||
|
||||
@ManyToOne(
|
||||
() => MiembroProyecto, (miembroProyecto) => miembroProyecto.proyecto
|
||||
)
|
||||
@JoinColumn({name: "id_proyecto"})
|
||||
miembroProyecto: MiembroProyecto
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ProyectoController } from './proyecto.controller';
|
||||
|
||||
describe('ProyectoController', () => {
|
||||
let controller: ProyectoController;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
controllers: [ProyectoController],
|
||||
}).compile();
|
||||
|
||||
controller = module.get<ProyectoController>(ProyectoController);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(controller).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
|
||||
@Controller('proyecto')
|
||||
export class ProyectoController {}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ProyectoController } from './proyecto.controller';
|
||||
import { ProyectoService } from './proyecto.service';
|
||||
|
||||
@Module({
|
||||
controllers: [ProyectoController],
|
||||
providers: [ProyectoService]
|
||||
})
|
||||
export class ProyectoModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { ProyectoService } from './proyecto.service';
|
||||
|
||||
describe('ProyectoService', () => {
|
||||
let service: ProyectoService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const module: TestingModule = await Test.createTestingModule({
|
||||
providers: [ProyectoService],
|
||||
}).compile();
|
||||
|
||||
service = module.get<ProyectoService>(ProyectoService);
|
||||
});
|
||||
|
||||
it('should be defined', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class ProyectoService {}
|
||||
@@ -0,0 +1,10 @@
|
||||
export interface SybaseConfig {
|
||||
|
||||
database: string;
|
||||
|
||||
host: string;
|
||||
|
||||
password: string;
|
||||
|
||||
username: string;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { ConfigurableModuleBuilder } from '@nestjs/common';
|
||||
import { SybaseConfig } from './sybase.config';
|
||||
|
||||
export const { ConfigurableModuleClass, MODULE_OPTIONS_TOKEN } =
|
||||
new ConfigurableModuleBuilder<SybaseConfig>()
|
||||
.setClassMethodName('forRoot')
|
||||
.build();
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { ConfigurableModuleClass } from './sybase.module-definition';
|
||||
import { SybaseService } from './sybase.service';
|
||||
|
||||
@Global()
|
||||
@Module({ providers: [SybaseService], exports: [SybaseService] })
|
||||
export class SybaseModule extends ConfigurableModuleClass {}
|
||||
@@ -0,0 +1,35 @@
|
||||
import * as Sybase from 'sybase';
|
||||
import {
|
||||
Inject,
|
||||
Injectable,
|
||||
InternalServerErrorException,
|
||||
} from '@nestjs/common';
|
||||
import { SybaseConfig } from './sybase.config';
|
||||
import { MODULE_OPTIONS_TOKEN } from './sybase.module-definition';
|
||||
|
||||
@Injectable()
|
||||
export class SybaseService {
|
||||
private db;
|
||||
|
||||
constructor(@Inject(MODULE_OPTIONS_TOKEN) private options: SybaseConfig) {
|
||||
this.db = new Sybase(
|
||||
options.host,
|
||||
options.database,
|
||||
options.username,
|
||||
options.password,
|
||||
);
|
||||
}
|
||||
|
||||
queryDsc(consulta: string): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.db.query(consulta, (err, data) => {
|
||||
console.log(consulta);
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export class Usuario {
|
||||
id_usuario: number;
|
||||
|
||||
@Column({ nullable: false })
|
||||
name: string;
|
||||
nombre: string;
|
||||
|
||||
@Column({ nullable: false })
|
||||
password: string;
|
||||
|
||||
Reference in New Issue
Block a user