Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
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-api
Commits
c397e01e
Commit
c397e01e
authored
May 01, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add time
parent
40302f37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
routes/api.js
routes/api.js
+3
-3
No files found.
routes/api.js
View file @
c397e01e
...
@@ -52,7 +52,7 @@ pool.on('error', function (err, client) {
...
@@ -52,7 +52,7 @@ pool.on('error', function (err, client) {
var
schedule
=
require
(
'
node-schedule
'
);
var
schedule
=
require
(
'
node-schedule
'
);
// 每月的1日0点30分30秒触发 :'30 30 0 1 * *'
// 每月的1日0点30分30秒触发 :'30 30 0 1 * *'
var
j
=
schedule
.
scheduleJob
(
'
30 30 0 1 * *
'
,
function
()
{
var
j
=
schedule
.
scheduleJob
(
'
30 30 0 1 * *
'
,
function
()
{
console
.
log
(
'
The scheduleJob run on first day of every month!
'
);
console
.
log
(
'
The scheduleJob run on first day of every month!
'
,
moment
().
format
(
'
YYYY-MM-DD
'
)
);
pool
.
connect
(
function
(
err
,
client
,
done
)
{
pool
.
connect
(
function
(
err
,
client
,
done
)
{
if
(
err
)
{
if
(
err
)
{
...
@@ -189,11 +189,11 @@ router.post('/score', function (req, res) {
...
@@ -189,11 +189,11 @@ router.post('/score', function (req, res) {
if
(
firstWin
)
{
if
(
firstWin
)
{
if
(
winner
===
usernameA
)
{
if
(
winner
===
usernameA
)
{
ptResult
.
ptA
+=
4
ptResult
.
ptA
+=
4
console
.
log
(
usernameA
,
'
首胜多加4DP
'
)
console
.
log
(
usernameA
,
'
首胜多加4DP
'
,
moment
().
format
(
'
YYYY-MM-DD
'
)
)
}
}
if
(
winner
===
usernameB
)
{
if
(
winner
===
usernameB
)
{
ptResult
.
ptB
+=
4
ptResult
.
ptB
+=
4
console
.
log
(
usernameB
,
'
首胜多加4DP
'
)
console
.
log
(
usernameB
,
'
首胜多加4DP
'
,
moment
().
format
(
'
YYYY-MM-DD
'
)
)
}
}
}
}
...
...
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