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
Commits
9b724314
Commit
9b724314
authored
5 years ago
by
Samuli Virtapohja
Browse files
Options
Downloads
Patches
Plain Diff
score folder audited
parent
7cfed59c
No related branches found
Branches containing commit
No related tags found
2 merge requests
!59
Development to master
,
!58
Development to testing
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/score/score.entity.ts
+1
-8
1 addition, 8 deletions
src/score/score.entity.ts
src/score/score.service.ts
+2
-8
2 additions, 8 deletions
src/score/score.service.ts
with
3 additions
and
16 deletions
src/score/score.entity.ts
+
1
−
8
View file @
9b724314
import
{
Entity
,
PrimaryGeneratedColumn
,
Column
,
ManyToOne
,
Timestamp
,
CreateDateColumn
,
}
from
'
typeorm
'
;
import
{
Entity
,
PrimaryGeneratedColumn
,
Column
,
ManyToOne
}
from
'
typeorm
'
;
import
{
FactionEntity
}
from
'
../faction/faction.entity
'
;
@
Entity
(
'
Score
'
)
...
...
This diff is collapsed.
Click to expand it.
src/score/score.service.ts
+
2
−
8
View file @
9b724314
import
{
Injectable
,
HttpException
,
HttpStatus
,
Logger
,
OnModuleInit
,
}
from
'
@nestjs/common
'
;
import
{
Injectable
,
HttpException
,
HttpStatus
}
from
'
@nestjs/common
'
;
import
{
InjectRepository
}
from
'
@nestjs/typeorm
'
;
import
{
Repository
}
from
'
typeorm
'
;
...
...
@@ -57,6 +51,7 @@ export class ScoreService {
};
}
// function to run on timer tick
async
scoreTick
(
gameId
)
{
// get game's flagboxes
const
flagboxes
=
await
this
.
flagRepository
.
find
({
game
:
gameId
});
...
...
@@ -110,7 +105,6 @@ export class ScoreService {
});
//if score was found, put info to scores array
if
(
score
.
faction
)
{
let
index
=
await
scores
.
findIndex
(
i
=>
i
.
faction
===
score
.
faction
);
scores
.
push
(
score
);
}
}),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment