Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Revive
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
Ygopro Arena Revive
Commits
aef690fd
Commit
aef690fd
authored
Jul 09, 2023
by
Peter Xin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
draft for historical record
parent
10cfe04d
Pipeline
#22602
passed with stages
in 2 minutes and 29 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
src/app.controller.ts
src/app.controller.ts
+4
-0
src/app.service.ts
src/app.service.ts
+14
-0
No files found.
src/app.controller.ts
View file @
aef690fd
...
@@ -230,6 +230,10 @@ export class AppController {
...
@@ -230,6 +230,10 @@ export class AppController {
async
getBattleHistory
(@
Query
()
query
:
any
)
{
async
getBattleHistory
(@
Query
()
query
:
any
)
{
return
await
this
.
appService
.
getBattleHistory
(
query
);
return
await
this
.
appService
.
getBattleHistory
(
query
);
}
}
@
Get
(
'
historyScore
'
)
async
getScoreHistory
(@
Query
()
query
:
any
)
{
return
await
this
.
appService
.
getScoreHistory
(
query
);
}
@
Get
(
'
user
'
)
@
Get
(
'
user
'
)
async
getUser
(@
Query
(
'
username
'
)
username
:
string
)
{
async
getUser
(@
Query
(
'
username
'
)
username
:
string
)
{
return
await
this
.
appService
.
getUser
(
username
);
return
await
this
.
appService
.
getUser
(
username
);
...
...
src/app.service.ts
View file @
aef690fd
...
@@ -41,6 +41,7 @@ import { HomePageMatchCountDto } from './dto/HomePageMatchCount.dto';
...
@@ -41,6 +41,7 @@ import { HomePageMatchCountDto } from './dto/HomePageMatchCount.dto';
import
{
AccountService
}
from
'
./account/account.service
'
;
import
{
AccountService
}
from
'
./account/account.service
'
;
import
{
CodeResponseDto
}
from
'
./dto/CodeResponse.dto
'
;
import
{
CodeResponseDto
}
from
'
./dto/CodeResponse.dto
'
;
import
{
PayExpDto
}
from
'
./dto/PayExp.dto
'
;
import
{
PayExpDto
}
from
'
./dto/PayExp.dto
'
;
import
{
UserHistoricalRecord
}
from
'
./entities/mycard/UserHistoricalRecord
'
;
const
attrOffset
=
1010
;
const
attrOffset
=
1010
;
const
raceOffset
=
1020
;
const
raceOffset
=
1020
;
...
@@ -1528,6 +1529,19 @@ export class AppService {
...
@@ -1528,6 +1529,19 @@ export class AppService {
}
}
return
ret
;
return
ret
;
}
}
async
getScoreHistory
(
query
:
any
):
Promise
<
UserHistoricalRecord
>
{
const
username
:
string
=
query
.
username
;
const
season
:
string
=
query
.
season
;
const
q
=
this
.
mcdb
.
getRepository
(
UserHistoricalRecord
)
.
createQueryBuilder
()
.
where
(
'
username = :username and season = :season
'
,
{
username
:
username
,
season
:
season
,
});
const
result
=
await
q
.
getOne
();
return
result
;
}
async
getUser
(
username
:
string
)
{
async
getUser
(
username
:
string
)
{
const
resultData
=
{
const
resultData
=
{
exp
:
0
,
exp
:
0
,
...
...
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