Commit 19e15fcd authored by soheib's avatar soheib
Browse files

fix get result

parent 3b77a902
...@@ -15,6 +15,11 @@ export class AppController { ...@@ -15,6 +15,11 @@ export class AppController {
async getFollowers() { async getFollowers() {
return await this.appService.addResultsToDB(); return await this.appService.addResultsToDB();
} }
// @Get('get-lottory-result')
// async getResultDb() {
// return await this.appService.getResultDb();
// }
} }
// @Get('get-followers') // @Get('get-followers')
...@@ -52,7 +57,4 @@ export class AppController { ...@@ -52,7 +57,4 @@ export class AppController {
// return await this.appService.addResultsToDB(); // return await this.appService.addResultsToDB();
// } // }
// @Get('get-lottory-result')
// async getResultDb() { \ No newline at end of file
// return await this.appService.getResultDb();
// }
\ No newline at end of file
...@@ -154,6 +154,12 @@ export class AppService implements OnApplicationBootstrap { ...@@ -154,6 +154,12 @@ export class AppService implements OnApplicationBootstrap {
await this.lottryResultModel.insertMany(comptitionArray); await this.lottryResultModel.insertMany(comptitionArray);
return 'successfull'; return 'successfull';
} }
async getResultDb() {
return await this.lottryResultModel
.find()
.select({ username: 1, index: 1});
}
} }
...@@ -711,11 +717,7 @@ export class AppService implements OnApplicationBootstrap { ...@@ -711,11 +717,7 @@ export class AppService implements OnApplicationBootstrap {
// return 'successfull'; // return 'successfull';
// } // }
// async getResultDb() {
// return await this.lotoryResultModel
// .find()
// .select({ username: 1,tagged_user:1, index: 1,status:1 });
// }
// export class ResultResponse { // export class ResultResponse {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment