Skip to content
Snippets Groups Projects
Commit 875666b6 authored by L4168's avatar L4168
Browse files

added roles auth

parent 0aed08e9
No related branches found
No related tags found
4 merge requests!59Development to master,!31Development,!25Dto service,!24Faction task edit
...@@ -37,8 +37,10 @@ export class TaskController { ...@@ -37,8 +37,10 @@ export class TaskController {
return this.taskService.editTask(data); return this.taskService.editTask(data);
} }
// lists all the tasks for the game if user has game_person entry
// :id is the id of the game
@Get('get-tasks/:id') @Get('get-tasks/:id')
@UseGuards(new AuthGuard()) @Roles('soldier', 'factionleader', 'admin')
async fetchTasks(@User('id') person, @Param('id') id: string) { async fetchTasks(@User('id') person, @Param('id') id: string) {
return this.taskService.fetchTasks(person, id); return this.taskService.fetchTasks(person, id);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment