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
a128cea4
Commit
a128cea4
authored
Aug 21, 2021
by
soheib
Browse files
fix get lottry
parent
07d6b22c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app.module.ts
View file @
a128cea4
...
...
@@ -16,7 +16,7 @@ import { StoryMentionSchema } from './instagram/models/storyMention.schema'
@
Module
({
imports
:
[
MongooseModule
.
forRoot
(
'
mongodb://
localhost:27017/instagram-lottry
'
,
'
mongodb://
instagram:wcD3B5sGw0yQ@185.231.180.248:27017/instagram-lottry?authSource=admin&authMechanism=SCRAM-SHA-256&connectTimeoutMS=10000&readPreference=primary&serverSelectionTimeoutMS=5000&appname=MongoDB%20Compass&directConnection=true&ssl=false
'
,
),
MongooseModule
.
forFeature
([
{
name
:
'
User
'
,
schema
:
UserSchema
},
...
...
src/lottery/lottery.service.ts
View file @
a128cea4
...
...
@@ -69,7 +69,7 @@ export class LotteryService {
}
async
getResultDb
()
{
return
await
this
.
lotteryResultModel
.
find
().
populate
(
"
user_id
"
,
{
"
username
"
:
1
},
"
User
"
).
sort
({
"
status
"
:
1
})
.
find
(
{
status
:
"
online
"
}
).
populate
(
"
user_id
"
,
{
"
username
"
:
1
},
"
User
"
).
sort
({
"
status
"
:
1
})
.
select
({
username
:
1
,
index
:
1
,
status
:
1
})
}
...
...
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