This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
numberNodes; | |
adjacencyMatrix; | |
constructor(numberNodes){ | |
this.numberNodes = numberNodes; | |
this.adjacencyMatrix = []; | |
for(let i = 0; i < this.numberNodes; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
numberNodes; | |
adjacencyMatrix; | |
constructor(numberNodes){ | |
this.numberNodes = numberNodes; | |
this.adjacencyMatrix = []; | |
for(let i = 0; i < this.numberNodes; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
numberNodes; | |
adjacencyMatrix; | |
constructor(numberNodes){ | |
this.numberNodes = numberNodes; | |
this.adjacencyMatrix = []; | |
for(let i = 0; i < this.numberNodes; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
adjacencyList; | |
constructor(){ | |
this.adjacencyList = new Map(); | |
} | |
addNode(node){ | |
this.adjacencyList.set(node, new Map()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEdge(node1, node2){ | |
this.adjacencyList.get(node1).add(node2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
adjacencyList; | |
constructor(){ | |
this.adjacencyList = new Map(); | |
} | |
addNode(node){ | |
this.adjacencyList.set(node, new Set()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Graph { | |
adjacencyList; | |
constructor(){ | |
this.adjacencyList = new Map(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Body, Controller, Post } from '@nestjs/common'; | |
import { AppService } from './app.service'; | |
import { Mail } from './dto/mail.interface'; | |
@Controller() | |
export class AppController { | |
constructor(private readonly appService: AppService) {} | |
@Post() | |
async sendEmail(@Body() data: Mail) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Mail { | |
from: string; | |
to: string; | |
subject: string; | |
text: string; | |
[key: string]: any; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MailerService } from '@nestjs-modules/mailer'; | |
import { Process, Processor } from '@nestjs/bull'; | |
import { Job } from 'bull'; | |
import { Mail } from './mail.interface'; | |
@Processor('emailSending') | |
export class EmailProcessor { | |
constructor(private readonly mailService: MailerService) {} | |
@Process('welcome') |
NewerOlder