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
f0278f47
Commit
f0278f47
authored
Nov 20, 2021
by
soheib
Browse files
update app controller
parent
13a60b22
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/app.controller.ts
View file @
f0278f47
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
()
}
}
...
...
src/lottery/lottery.controller.ts
View file @
f0278f47
...
...
@@ -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
'
)
...
...
src/lottery/lottery.module.ts
View file @
f0278f47
...
...
@@ -40,6 +40,7 @@ import { ScoreService } from './score.service';
]),
],
controllers
:
[
LotteryController
],
providers
:
[
LotteryService
,
ScoreService
]
providers
:
[
LotteryService
,
ScoreService
],
exports
:
[
LotteryService
]
})
export
class
LotteryModule
{
}
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