Skip to content

Commit

Permalink
added service to retreive event chat data
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaLoubser committed Sep 25, 2023
1 parent 54cee58 commit 699838f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/api/event/feature/src/event.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ import {
IGetEventFloorlayoutImageResponse,
IAddChatMessageRequest,
AddChatMessageCommand,
IGetEventChatMessagesRequest,
IGetEventChatMessagesResponse,
GetEventChatMessagesQuery,
} from '@event-participation-trends/api/event/util';
import { Injectable } from '@nestjs/common';
import { CommandBus, QueryBus } from '@nestjs/cqrs';
Expand Down Expand Up @@ -211,4 +214,8 @@ export class EventService {
async addEventChatMessage(request: IAddChatMessageRequest){
return await this.commandBus.execute<AddChatMessageCommand, void>(new AddChatMessageCommand(request));
}

async getEventStallChats(request: IGetEventChatMessagesRequest) {
return await this.queryBus.execute<GetEventChatMessagesQuery, IGetEventChatMessagesResponse>(new GetEventChatMessagesQuery(request));
}
}

0 comments on commit 699838f

Please sign in to comment.