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
6bff5c44
Commit
6bff5c44
authored
Jul 28, 2021
by
velayat
Browse files
404 message changed for search
parent
577f8a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app.service.ts
View file @
6bff5c44
...
...
@@ -36,7 +36,8 @@ export class AppService implements OnApplicationBootstrap {
private
resultModel
:
Model
<
ResultDocument
>
,
@
InjectModel
(
'
LottoryResult
'
)
private
lotoryResultModel
:
Model
<
LottoryResultDocument
>
,
)
{}
)
{
}
async
onApplicationBootstrap
()
{
this
.
client
=
await
this
.
login
(
'
shahriarvelayat
'
,
'
shve8864@@
'
);
...
...
@@ -594,7 +595,7 @@ export class AppService implements OnApplicationBootstrap {
username
=
username
.
toLowerCase
();
const
userRes
=
await
this
.
resultModel
.
findOne
({
username
});
const
userIndexs
=
await
this
.
lotoryResultModel
.
find
({
username
});
if
(
!
userRes
)
throw
new
NotFoundException
(
'
User not
F
ound
'
)
;
if
(
!
userRes
)
return
'
User not
f
ound
'
;
const
response
:
ResultResponse
=
new
ResultResponse
();
response
.
users
=
new
Array
<
any
>
();
response
.
lottory_chances_codes
=
new
Array
<
string
>
();
...
...
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