Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another
Commits
56a70811
Commit
56a70811
authored
Aug 10, 2025
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update src/tournament/tournament.service.ts
parent
dd535a0a
Pipeline
#40060
passed with stages
in 4 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
src/tournament/tournament.service.ts
src/tournament/tournament.service.ts
+7
-3
No files found.
src/tournament/tournament.service.ts
View file @
56a70811
...
@@ -87,14 +87,14 @@ export class TournamentService extends CrudService(Tournament, {
...
@@ -87,14 +87,14 @@ export class TournamentService extends CrudService(Tournament, {
id
:
number
,
id
:
number
,
user
:
MycardUser
|
number
,
user
:
MycardUser
|
number
,
noAnalytics
=
false
,
noAnalytics
=
false
,
noCache
=
false
,
)
{
)
{
// we check for permission first
// we check for permission first
await
this
.
findOne
(
id
,
(
qb
)
=>
{
await
this
.
findOne
(
id
,
(
qb
)
=>
{
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
);
Tournament
.
extraQueryForUser
(
user
,
qb
,
this
.
entityAliasName
);
qb
.
select
(
`
${
this
.
entityAliasName
}
.id`
);
qb
.
select
(
`
${
this
.
entityAliasName
}
.id`
);
});
});
const
key
=
`tournament_cache2:
${
id
}
:
${
noAnalytics
?
1
:
0
}
`
;
const
fetchTournament
=
async
()
=>
{
const
res
=
await
this
.
aragami
.
cache
(
TournamentCache
,
key
,
async
()
=>
{
const
result
=
await
this
.
findOne
(
id
);
const
result
=
await
this
.
findOne
(
id
);
if
(
result
.
data
)
{
if
(
result
.
data
)
{
if
(
result
.
data
.
status
===
TournamentStatus
.
Ready
&&
!
noAnalytics
)
{
if
(
result
.
data
.
status
===
TournamentStatus
.
Ready
&&
!
noAnalytics
)
{
...
@@ -106,7 +106,9 @@ export class TournamentService extends CrudService(Tournament, {
...
@@ -106,7 +106,9 @@ export class TournamentService extends CrudService(Tournament, {
cache
.
noAnalytics
=
noAnalytics
;
cache
.
noAnalytics
=
noAnalytics
;
cache
.
tournament
=
result
.
data
;
cache
.
tournament
=
result
.
data
;
return
cache
;
return
cache
;
});
};
const
key
=
`tournament_cache2:
${
id
}
:
${
noAnalytics
?
1
:
0
}
`
;
const
res
=
await
(
noCache
?
fetchTournament
()
:
this
.
aragami
.
cache
(
TournamentCache
,
key
,
fetchTournament
));
const
tournament
=
res
.
tournament
;
const
tournament
=
res
.
tournament
;
tournament
.
wipeDeckBuf
(
user
);
tournament
.
wipeDeckBuf
(
user
);
return
new
GenericReturnMessageDto
(
200
,
'
success
'
,
tournament
);
return
new
GenericReturnMessageDto
(
200
,
'
success
'
,
tournament
);
...
@@ -320,6 +322,8 @@ export class TournamentService extends CrudService(Tournament, {
...
@@ -320,6 +322,8 @@ export class TournamentService extends CrudService(Tournament, {
const
{
data
:
tournament
}
=
await
this
.
getTournament
(
const
{
data
:
tournament
}
=
await
this
.
getTournament
(
dto
.
tournamentId
,
dto
.
tournamentId
,
user
,
user
,
false
,
true
,
);
);
participants
=
tournament
.
participants
.
map
((
p
)
=>
participants
=
tournament
.
participants
.
map
((
p
)
=>
Object
.
assign
(
new
Participant
(),
{
Object
.
assign
(
new
Participant
(),
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment