Modifiche
This commit is contained in:
@@ -7,7 +7,7 @@ class GroupsController {
|
||||
|
||||
async getAllGroups(req, res, next) {
|
||||
try {
|
||||
const groups = await this.groupsService.getAllGroups();
|
||||
const groups = await this.groupsService.getAllGroups(req.userId);
|
||||
return ResponseHandler.success(res, groups, 'Groups retrieved successfully');
|
||||
} catch (error) {
|
||||
next(error);
|
||||
@@ -52,10 +52,7 @@ class GroupsController {
|
||||
|
||||
async addMembers(req, res, next) {
|
||||
try {
|
||||
const group = await this.groupsService.addMembersToGroup(
|
||||
req.params.id,
|
||||
req.body.userIds
|
||||
);
|
||||
const group = await this.groupsService.addMembersToGroup(req.params.id, req.body.userIds);
|
||||
return ResponseHandler.success(res, group, 'Members added successfully');
|
||||
} catch (error) {
|
||||
next(error);
|
||||
|
||||
Reference in New Issue
Block a user