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
19e15fcd
Commit
19e15fcd
authored
Aug 07, 2021
by
soheib
Browse files
fix get result
parent
3b77a902
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app.controller.ts
View file @
19e15fcd
...
...
@@ -15,6 +15,11 @@ export class AppController {
async
getFollowers
()
{
return
await
this
.
appService
.
addResultsToDB
();
}
// @Get('get-lottory-result')
// async getResultDb() {
// return await this.appService.getResultDb();
// }
}
// @Get('get-followers')
...
...
@@ -52,7 +57,4 @@ export class AppController {
// return await this.appService.addResultsToDB();
// }
// @Get('get-lottory-result')
// async getResultDb() {
// return await this.appService.getResultDb();
// }
\ No newline at end of file
\ No newline at end of file
src/app.service.ts
View file @
19e15fcd
...
...
@@ -154,6 +154,12 @@ export class AppService implements OnApplicationBootstrap {
await
this
.
lottryResultModel
.
insertMany
(
comptitionArray
);
return
'
successfull
'
;
}
async
getResultDb
()
{
return
await
this
.
lottryResultModel
.
find
()
.
select
({
username
:
1
,
index
:
1
});
}
}
...
...
@@ -711,11 +717,7 @@ export class AppService implements OnApplicationBootstrap {
// return 'successfull';
// }
// async getResultDb() {
// return await this.lotoryResultModel
// .find()
// .select({ username: 1,tagged_user:1, index: 1,status:1 });
// }
// export class ResultResponse {
...
...
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