Removes the exchange of quizzes if they are deleted

parent 9448f4a4
......@@ -179,13 +179,11 @@ export class QuizEntity extends AbstractEntity implements IQuizEntity {
}
public onRemove(): void {
MemberDAO.getMembersOfQuiz(this.name).forEach(member => {
AMQPConnector.channel.deleteQueue(encodeURI(`${member.currentQuizName}_${member.name}`));
});
AMQPConnector.channel.publish(this._exchangeName, '.*', Buffer.from(JSON.stringify({
status: StatusProtocol.Success,
step: MessageProtocol.Closed,
})));
AMQPConnector.channel.deleteExchange(this._exchangeName);
}
public reset(): void {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment