Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
shahriar
instagram-service
Commits
58873aad
Commit
58873aad
authored
Aug 22, 2021
by
soheib
Browse files
add return lottry chancess in weekly search response
parent
dbfe9be0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lottery/lottery.service.ts
View file @
58873aad
...
...
@@ -47,13 +47,19 @@ export class LotteryService {
postArray
,
)
const
addToStoryScore
=
await
this
.
scoreService
.
getTagsScore
(
username
)
let
foundIndexes
=
await
this
.
lotteryResultModel
.
find
({
user_id
:
foundUser
.
_id
})
let
chances
=
new
Array
<
string
>
()
foundIndexes
.
forEach
(
result
=>
{
chances
.
push
(
result
.
index
)
})
return
{
likesScore
,
commentScore
,
addToStoryScore
,
totalScore
:
likesScore
+
commentScore
+
addToStoryScore
,
lottry_chances
:
chances
}
}
async
addResultsToDB
(
profileUsername
:
string
,
postArray
:
string
[])
{
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment