UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Launchboard
launchboard-fe
Commits
69bde358
Commit
69bde358
authored
Oct 13, 2020
by
Graham Smith
Browse files
fix mock user role
parent
ac1a3d0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
src/api/services/user.js
src/api/services/user.js
+12
-4
No files found.
src/api/services/user.js
View file @
69bde358
...
@@ -9,11 +9,19 @@ const getUserApi = async () => {
...
@@ -9,11 +9,19 @@ const getUserApi = async () => {
// TODO: remove this temp code once the API includes role data
// TODO: remove this temp code once the API includes role data
const
user
=
response
.
data
;
const
user
=
response
.
data
;
user
.
auth
=
{
const
existingUserJson
=
localStorage
.
getItem
(
"
user
"
);
role
:
"
user
"
if
(
existingUserJson
)
{
};
const
existingUser
=
JSON
.
parse
(
existingUserJson
);
user
.
auth
=
existingUser
.
auth
;
}
if
(
!
user
.
auth
)
{
user
.
auth
=
{
role
:
"
user
"
};
}
console
.
log
(
"
user:
"
,
user
);
localStorage
.
setItem
(
"
user
"
,
JSON
.
stringify
(
user
));
// end temp code
return
user
;
return
user
;
};
};
...
...
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