Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalWebpage
Commits
95aac1ca
Commit
95aac1ca
authored
Jan 29, 2020
by
Lukas Burgey
Browse files
Remove /backend prefix from routes
Also adapts to renamed routes
parent
a2b25760
Changes
1
Show whitespace changes
Inline
Side-by-side
src/app/user.service.ts
View file @
95aac1ca
...
@@ -221,7 +221,7 @@ export class UserService {
...
@@ -221,7 +221,7 @@ export class UserService {
}
}
private
fetch
():
void
{
private
fetch
():
void
{
this
.
http
.
get
<
State
>
(
'
/
backend/api
/state
'
).
subscribe
(
this
.
http
.
get
<
State
>
(
'
/
webpage
/state
'
).
subscribe
(
(
state
:
State
)
=>
this
.
updateState
(
state
),
(
state
:
State
)
=>
this
.
updateState
(
state
),
this
.
handleError
(
false
,
'
Error fetching state. Try again later
'
),
this
.
handleError
(
false
,
'
Error fetching state. Try again later
'
),
);
);
...
@@ -270,7 +270,7 @@ export class UserService {
...
@@ -270,7 +270,7 @@ export class UserService {
}
}
private
fetchIdPInfo
():
void
{
private
fetchIdPInfo
():
void
{
this
.
http
.
get
<
IdPInfo
>
(
'
/
backend/
auth/
v1/
info
'
).
subscribe
(
this
.
http
.
get
<
IdPInfo
>
(
'
/auth/info
'
).
subscribe
(
idpInfo
=>
{
idpInfo
=>
{
this
.
idpInfo
.
next
(
idpInfo
);
this
.
idpInfo
.
next
(
idpInfo
);
this
.
idpInfo
.
complete
();
this
.
idpInfo
.
complete
();
...
@@ -328,7 +328,7 @@ export class UserService {
...
@@ -328,7 +328,7 @@ export class UserService {
}
}
public
logout
():
void
{
public
logout
():
void
{
this
.
http
.
post
<
State
>
(
'
/
backend/
auth/
v1/
logout
'
,
undefined
).
subscribe
(
this
.
http
.
post
<
State
>
(
'
/auth/logout
'
,
undefined
).
subscribe
(
(
state
:
State
)
=>
this
.
updateState
(
state
),
(
state
:
State
)
=>
this
.
updateState
(
state
),
(
err
:
HttpErrorResponse
)
=>
{
(
err
:
HttpErrorResponse
)
=>
{
this
.
updateState
(
undefined
);
this
.
updateState
(
undefined
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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