.
This commit is contained in:
1 parent
30dfb7ce58
commit
5af2c80cd1
33 files changed
+3806
-1440
No files matched your search
@@ -2,6 +2,7 @@ import {
|
||||
Body,
|
||||
Controller,
|
||||
ForbiddenException,
|
||||
Get,
|
||||
Param,
|
||||
Patch,
|
||||
Post,
|
||||
@@ -26,6 +27,14 @@ export class CommunityController {
|
||||
return this.communityService.createCommunityWithOwner(body);
|
||||
}
|
||||
|
||||
@Get(':communityId')
|
||||
public async getCommunity(
|
||||
@Param('communityId', ParseObjectIdPipe)
|
||||
communityId: mongoose.Types.ObjectId,
|
||||
) {
|
||||
return this.communityService.getById(communityId);
|
||||
}
|
||||
|
||||
@Patch(':communityId/members/:userId/promote')
|
||||
@Roles('owner')
|
||||
@UseGuards(RolesGuard)
|
||||
|
||||
Reference in new issue
Block a user