Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ehasa-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WIMMA Lab 2019
Overflow
ehasa-backend
Merge requests
!18
Join game
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Join game
JoinGame
into
Development
Overview
0
Commits
21
Pipelines
0
Changes
2
Merged
Ghost User
requested to merge
JoinGame
into
Development
5 years ago
Overview
0
Commits
21
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Viewing commit
bb4400dc
Prev
Next
Show latest version
2 files
+
7
−
13
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
bb4400dc
implemented guard logic for editing games
· bb4400dc
L4168
authored
5 years ago
src/game/game.controller.ts
+
1
−
2
Options
@@ -23,14 +23,13 @@ export class GameController {
@@ -23,14 +23,13 @@ export class GameController {
@
Post
(
'
new
'
)
@
Post
(
'
new
'
)
@
UseGuards
(
new
AuthGuard
())
@
UseGuards
(
new
AuthGuard
())
//
@UsePipes(new ValidationPipe())
@
UsePipes
(
new
ValidationPipe
())
async
newGame
(@
User
(
'
id
'
)
person
,
@
Body
()
body
:
GameDTO
)
{
async
newGame
(@
User
(
'
id
'
)
person
,
@
Body
()
body
:
GameDTO
)
{
return
this
.
gameservice
.
createNewGame
(
person
,
body
);
return
this
.
gameservice
.
createNewGame
(
person
,
body
);
}
}
@
Put
(
'
:id
'
)
@
Put
(
'
:id
'
)
@
Roles
(
'
admin
'
)
@
Roles
(
'
admin
'
)
@
UseGuards
(
new
AuthGuard
())
@
UsePipes
(
new
ValidationPipe
())
@
UsePipes
(
new
ValidationPipe
())
async
editGame
(@
Param
(
'
id
'
)
id
:
string
,
@
Body
()
body
:
GameDTO
)
{
async
editGame
(@
Param
(
'
id
'
)
id
:
string
,
@
Body
()
body
:
GameDTO
)
{
return
this
.
gameservice
.
editGame
(
id
,
body
);
return
this
.
gameservice
.
editGame
(
id
,
body
);
Loading