Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinhaitao
taobao-mini-template
Commits
ddfbaa0c
Commit
ddfbaa0c
authored
Nov 27, 2020
by
qinhaitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:
🐛
checkBug
parent
b3b53ede
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
checkValidPrize.ts
v2.0/src/utils/common/check/checkValidPrize.ts
+3
-7
No files found.
v2.0/src/utils/common/check/checkValidPrize.ts
View file @
ddfbaa0c
...
@@ -6,7 +6,7 @@ import { DRAW_STATUS, PRIZE_TYPE } from '../../../constants'
...
@@ -6,7 +6,7 @@ import { DRAW_STATUS, PRIZE_TYPE } from '../../../constants'
import
{
dbFindOne
}
from
'../mongodb'
import
{
dbFindOne
}
from
'../mongodb'
import
{
AWARDS_DB_NAME
}
from
'../../../db'
import
{
AWARDS_DB_NAME
}
from
'../../../db'
export
default
async
function
checkValidPrize
(
prizeTypes
:
number
[])
{
export
default
function
checkValidPrize
(
prizeTypes
:
number
[])
{
return
async
(
context
:
IContext
<
{
id
:
string
}
>
,
{
activityInfo
}:
IControllerInfos
)
=>
{
return
async
(
context
:
IContext
<
{
id
:
string
}
>
,
{
activityInfo
}:
IControllerInfos
)
=>
{
const
{
id
}
=
context
.
data
const
{
id
}
=
context
.
data
let
awardInfo
=
await
dbFindOne
<
IAwards
>
(
context
,
AWARDS_DB_NAME
,
{
let
awardInfo
=
await
dbFindOne
<
IAwards
>
(
context
,
AWARDS_DB_NAME
,
{
...
@@ -33,10 +33,6 @@ export default async function checkValidPrize(prizeTypes: number[]) {
...
@@ -33,10 +33,6 @@ export default async function checkValidPrize(prizeTypes: number[]) {
}
}
}
}
export
async
function
checkValidObjectPrize
(
context
:
IContext
<
{
id
:
string
}
>
,
{
activityInfo
}:
IControllerInfos
)
{
export
const
checkValidObjectPrize
=
checkValidPrize
([
PRIZE_TYPE
.
OBJECT
])
return
await
checkValidPrize
([
PRIZE_TYPE
.
OBJECT
])
}
export
async
function
checkValidEnamePrize
(
context
:
IContext
<
{
id
:
string
}
>
,
{
activityInfo
}:
IControllerInfos
)
{
export
const
checkValidEnamePrize
=
checkValidPrize
([
PRIZE_TYPE
.
ENAME
,
PRIZE_TYPE
.
CREDITS
])
return
await
checkValidPrize
([
PRIZE_TYPE
.
ENAME
,
PRIZE_TYPE
.
CREDITS
])
}
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