import {CommandHandler, ICommandHandler} from "@nestjs/cqrs";
import {Promise} from "mongoose";
import {GuestsService} from "../guests.service";

export class SendBetweenRoundsActionsCommand {
  constructor(public user: number, public inline: boolean = true) {
  }
}

@CommandHandler(SendBetweenRoundsActionsCommand)
export class SendBetweenRoundsActionsHandler implements ICommandHandler<SendBetweenRoundsActionsCommand> {
  constructor(private guestService: GuestsService) {
  }
  execute(command: SendBetweenRoundsActionsCommand): Promise<any> {
    return this.guestService.sendActionsBetweenRounds(command.user, command.inline)
  }

}