docker ignore, ignore tar file, commet mail controller, docker compose pentester
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.env
|
||||
*.log
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
|
||||
*.tar
|
||||
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/node_modules
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:latest
|
||||
container_name: mariadb-service
|
||||
ports:
|
||||
- "4101:3306"
|
||||
environment:
|
||||
MARIADB_ROOT_PASSWORD: mypass
|
||||
MARIADB_DATABASE: ApiCorreos
|
||||
volumes:
|
||||
- mariadb_data:/var/lib/mysql
|
||||
|
||||
api:
|
||||
image: correos_api:v0 # <--- la imagen final (comprobada en el paso anterior)
|
||||
container_name: nestjs-api
|
||||
environment:
|
||||
# Ajustar estas vars a tu conveniencia
|
||||
db_host: mariadb
|
||||
db_port: 3306
|
||||
db_username: root
|
||||
db_password: mypass
|
||||
db_database: ApiCorreos
|
||||
PORT: 4100
|
||||
ports:
|
||||
- "4100:4100"
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
volumes:
|
||||
mariadb_data:
|
||||
@@ -33,7 +33,12 @@ export class MailController {
|
||||
@Headers() headers:{password:string},
|
||||
@Body() body: { to: string; subject: string; text: string; fecha_recibido: Date }) {
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// esta parte hay que rehacerla, se tiene que obtener la contraseña del sistema en base a la clave del sistema.
|
||||
// debe de existir un modulo para crear contraseñas para las apis y administrar esas contraseñas
|
||||
|
||||
|
||||
if (!headers.password) {
|
||||
throw new UnauthorizedException('Header "Password" es requerido');
|
||||
}
|
||||
@@ -42,12 +47,12 @@ export class MailController {
|
||||
|
||||
if (!sistem) {
|
||||
throw new UnauthorizedException('Password incorrecto');
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
const { to, subject, text, fecha_recibido } = body;
|
||||
|
||||
const result = await this.mailService.sendMail(to, subject, text, fecha_recibido,sistem);
|
||||
const result = await this.mailService.sendMail(to, subject, text, fecha_recibido,1); // sistem
|
||||
return result;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user