Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
feudal
feudalWebpage
Commits
497c54e5
Commit
497c54e5
authored
Jan 30, 2018
by
Lukas Burgey
Browse files
Use environment for settings
parent
36ecdfcf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/user.service.ts
View file @
497c54e5
...
...
@@ -10,6 +10,8 @@ import { MatTableDataSource } from '@angular/material';
import
{
SnackBarService
}
from
'
./snackbar.service
'
;
import
{
environment
}
from
'
../environments/environment
'
;
interface
Group
{
name
:
string
;
}
...
...
@@ -92,11 +94,11 @@ export class UserService {
}
public
setIdPPreference
(
idpId
:
number
)
{
this
.
cookieService
.
set
(
'
idp_id
'
,
String
(
idpId
));
this
.
cookieService
.
set
(
environment
.
idpCookieName
,
String
(
idpId
));
}
public
getIdPPreference
():
number
{
return
Number
(
this
.
cookieService
.
get
(
'
idp_id
'
));
return
Number
(
this
.
cookieService
.
get
(
environment
.
idpCookieName
));
}
public
updateData
(
data
:
any
)
{
...
...
src/environments/environment.ts
View file @
497c54e5
...
...
@@ -4,5 +4,6 @@
// The list of which env maps to which file can be found in `.angular-cli.json`.
export
const
environment
=
{
production
:
false
production
:
false
,
idpCookieName
:
'
idp_id
'
};
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