your message

This commit is contained in:
root
2026-02-06 14:53:52 +00:00
parent c809d049fe
commit 3d488f22b7
47 changed files with 3127 additions and 425 deletions

View File

@ -16,8 +16,18 @@ export class GroupsController {
}
@Post(':groupId/members')
async addMember(@Param('groupId') groupId: string, @Body('userId') userId: string): Promise<any> {
return this.groupsService.addMember(groupId, userId);
async addMember(@Param('groupId') groupId: string, @Body('userId') userId: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.addMember(groupId, user.id, userId);
}
@Get('course/:courseId/default')
async getDefaultGroup(@Param('courseId') courseId: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.getDefaultGroup(courseId, user.id);
}
@Get(':groupId/members')
async getMembers(@Param('groupId') groupId: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.getGroupMembers(groupId, user.id);
}
@Get(':groupId/messages')
@ -29,4 +39,14 @@ export class GroupsController {
async sendMessage(@Param('groupId') groupId: string, @Body('content') content: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.sendMessage(groupId, user.id, content);
}
@Post(':groupId/invite-link')
async createInviteLink(@Param('groupId') groupId: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.createInviteLink(groupId, user.id);
}
@Post('join/:groupId')
async joinByInvite(@Param('groupId') groupId: string, @CurrentUser() user: User): Promise<any> {
return this.groupsService.joinByInvite(groupId, user.id);
}
}