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

fix get result

parent 3b77a902
......@@ -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
......@@ -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 {
......
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