Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Codecrew
/
Moya
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
30
Merge Requests
2
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6ee7b5b9
authored
Aug 04, 2018
by
Aino Leppänen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '109-rxjs-update' into 'master'
lint errors fixed Closes
#109
See merge request
!415
2 parents
c0a36ab6
e0fd9f99
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
code/moya-angular/package.json
code/moya-angular/src/app/components/moya-locale/locale.service.ts
code/moya-angular/src/app/modules/viplist/viplist.service.ts
code/moya-angular/src/app/shared/services/cache.service.ts
code/moya-angular/package.json
View file @
6ee7b5b
...
...
@@ -5,7 +5,7 @@
"angular-cli"
:
{},
"scripts"
:
{
"ng"
:
"ng"
,
"start"
:
"ng serve --proxy-config=moyaproxy.conf.json --base-href=/"
,
"start"
:
"ng serve --proxy-config=moyaproxy.conf.json --base-href=/
&& ng lint
"
,
"build"
:
"ng build"
,
"aot"
:
"ng build --aot"
,
"test"
:
"ng test"
,
...
...
code/moya-angular/src/app/components/moya-locale/locale.service.ts
View file @
6ee7b5b
...
...
@@ -91,7 +91,7 @@ export class LocaleService {
}
return
this
.
selectLocale
(
DEFAULT_LOCALE
);
}),);
}),
);
}
...
...
code/moya-angular/src/app/modules/viplist/viplist.service.ts
View file @
6ee7b5b
...
...
@@ -29,11 +29,11 @@ export class ViplistService {
if
(
!
searchString
)
{
return
this
.
http
.
get
(
MOYA_BASE_URL
+
'v3/vip/all'
).
pipe
(
switchMap
(
res
=>
observableForkJoin
(...(
res
as
Array
<
any
>
)
.
map
(
apiRow
=>
this
.
hostPopulator
(
apiRow
)))));
switchMap
(
res
=>
observableForkJoin
(...(
res
as
Array
<
any
>
)
,
map
(
apiRow
=>
this
.
hostPopulator
(
apiRow
)))));
}
return
this
.
http
.
get
(
MOYA_BASE_URL
+
'v3/vip/search/'
+
searchString
).
pipe
(
switchMap
(
v
=>
observableForkJoin
(...(
v
as
Array
<
any
>
)
.
map
(
x
=>
this
.
hostPopulator
(
x
)))));
switchMap
(
v
=>
observableForkJoin
(...(
v
as
Array
<
any
>
)
,
map
(
x
=>
this
.
hostPopulator
(
x
)))));
}
...
...
@@ -70,7 +70,7 @@ export class ViplistService {
private
hostPopulator
(
rawVip
:
any
):
Observable
<
Vip
>
{
return
this
.
userService
.
get
(
rawVip
.
hostId
).
pipe
(
map
((
u
:
User
)
=>
{
rawVip
.
host
=
u
;
return
<
Vip
>
rawVip
;
}),
map
(
x
=>
x
as
Vip
),
);
map
((
u
:
User
)
=>
{
rawVip
.
host
=
u
;
return
<
Vip
>
rawVip
;
}),
map
(
x
=>
x
as
Vip
),
);
}
...
...
code/moya-angular/src/app/shared/services/cache.service.ts
View file @
6ee7b5b
...
...
@@ -87,7 +87,7 @@ export class CacheService {
const
hotSource
=
source
.
pipe
(
tap
(
val
=>
this
.
cache
.
set
(
cacheName
,
new
CachedItem
(
moduleName
,
cachePath
,
val
))),
publishLast
(),
refCount
(),
);
publishLast
(),
refCount
(),
);
this
.
cache
.
set
(
cacheName
,
new
CachedItem
(
moduleName
,
cachePath
,
hotSource
,
true
));
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment