Skip to content

Commit

Permalink
Merge pull request #41 from PolyHx/feature/activities-admin
Browse files Browse the repository at this point in the history
Added route to update activity
  • Loading branch information
stephanieleclerc authored Apr 4, 2019
2 parents ff0ec21 + 2849c02 commit 5366b4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modules/database/activities/activities.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,12 @@ export class ActivitiesController {
public async createNotification(@Param("id") id: string, @Body(new ValidationPipe()) dto: SendNotificationDto) {
await this.activitiesService.createNotification(id, dto);
}

@Put(":id")
@Permissions("csgames-api:update:activity")
public async update(@Param("id") id: string, @Body(new ValidationPipe()) activity: CreateActivityDto) {
await this.activitiesService.update({
_id: id
}, activity);
}
}

0 comments on commit 5366b4c

Please sign in to comment.