Commit f0278f47 authored by soheib's avatar soheib
Browse files

update app controller

parent 13a60b22
import { Body, Controller, Get, Post } from '@nestjs/common';
import { AppService } from './app.service';
import { LotteryService } from './lottery/lottery.service';
@Controller()
export class AppController {
constructor(private readonly appService: AppService) { }
constructor(private readonly appService: AppService,
private lotteryService: LotteryService) { }
@Get('get-results')
async getResultDb() {
return await this.lotteryService.getResultDb()
}
}
......
......@@ -23,11 +23,7 @@ export class LotteryController {
return await this.lotteryService.addResultsToDB()
}
@ApiTags('Lottery/weekly')
@Get('weekly/get-results')
async getResultDb() {
return await this.lotteryService.getResultDb()
}
@ApiBody({ type: ChangeStatusDto })
@ApiTags('Lottery/weekly')
......
......@@ -40,6 +40,7 @@ import { ScoreService } from './score.service';
]),
],
controllers: [LotteryController],
providers: [LotteryService, ScoreService]
providers: [LotteryService, ScoreService],
exports: [LotteryService]
})
export class LotteryModule { }
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