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
Couldn't fetch the linked file.
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
f7d55d7e
Prev
Next
Show latest version
2 files
+
21
−
12
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)
f7d55d7e
waiting
· f7d55d7e
Samuli Virtapohja
authored
5 years ago
src/user/user.service.ts
+
21
−
0
Options
@@ -36,4 +36,25 @@ export class UserService {
@@ -36,4 +36,25 @@ export class UserService {
}
}
}
}
// liitytään peliin
async
joinGame
(
game
:
GameDTO
,
data
:
UserDTO
){
try
{
// etsi peli valinnan mukaan ja otetaan käyttäjän rooli kyseisestä pelistä talteen
const
role
=
await
this
.
gameRepository
.
findOne
();
return
gamedata
;
}
catch
(
error
)
{
return
error
.
message
;
}
}
// liitytään factionii
async
joinFaction
():
Promise
<
boolean
>
{
try
{
// tarkistetaan factionin salasana
return
true
;
}
catch
(
error
)
{
return
error
;
}
}
}
}
Loading