This commit is contained in:
Bastian Wagner
2025-12-22 15:51:59 +01:00
parent bb6d7346f7
commit 88f827d4b4
17 changed files with 259 additions and 46 deletions

View File

@@ -1,4 +1,4 @@
import { Body, Controller, Get, Param, Post } from '@nestjs/common';
import { Body, Controller, Get, Param, Post, Req, Session } from '@nestjs/common';
import { GroupEventsService } from '../application/group-events.service';
import { IncomingGroupEventDto } from '../dto/group-event.dto';
@@ -17,13 +17,13 @@ export class GroupEventsController {
}
@Get()
getEvents() {
return this.groupsEventsService.getLastTenEvents();
getEvents(@Session() session: Record<string, any>) {
return this.groupsEventsService.getLastEvents({});
}
@Get(':groupdId')
getGroupEvents(@Param('groupId') groupId: string) {
return this.groupsEventsService.getLastTenEvents(groupId);
return this.groupsEventsService.getLastEvents({groupId});
}
}