Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
funkwhale
funkwhale
Commits
e3b734a8
Commit
e3b734a8
authored
Apr 21, 2022
by
Kasper Seweryn
🥞
Committed by
Kasper Seweryn
Jul 03, 2022
Browse files
Remove initSettings
parent
c4f01b3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
front/src/store/auth.js
View file @
e3b734a8
...
...
@@ -165,7 +165,6 @@ export default {
return
new
Promise
((
resolve
,
reject
)
=>
{
axios
.
get
(
'
users/me/
'
).
then
((
response
)
=>
{
logger
.
default
.
info
(
'
Successfully fetched user profile
'
)
dispatch
(
'
ui/initSettings
'
,
response
.
data
.
settings
,
{
root
:
true
})
dispatch
(
'
updateProfile
'
,
response
.
data
)
dispatch
(
'
ui/fetchUnreadNotifications
'
,
null
,
{
root
:
true
})
if
(
response
.
data
.
permissions
.
library
)
{
...
...
front/src/store/ui.js
View file @
e3b734a8
...
...
@@ -346,12 +346,6 @@ export default {
}
},
async
initSettings
({
commit
},
settings
)
{
settings
=
settings
||
{}
if
(
settings
.
language
)
{
commit
(
'
currentLanguage
'
,
settings
.
language
)
}
},
websocketEvent
({
state
},
event
)
{
const
handlers
=
state
.
websocketEventsHandlers
[
event
.
type
]
console
.
log
(
'
Dispatching websocket event
'
,
event
,
handlers
)
...
...
front/tests/unit/specs/store/auth.spec.js
View file @
e3b734a8
...
...
@@ -133,7 +133,6 @@ describe('store/auth', () => {
{
type
:
'
permission
'
,
payload
:
{
key
:
'
admin
'
,
status
:
true
}
}
],
expectedActions
:
[
{
type
:
'
ui/initSettings
'
,
payload
:
{
root
:
true
}
},
{
type
:
'
updateProfile
'
,
payload
:
profile
},
{
type
:
'
ui/fetchUnreadNotifications
'
,
payload
:
null
},
{
type
:
'
favorites/fetch
'
,
payload
:
null
,
options
:
{
root
:
true
}
},
...
...
Write
Preview
Supports
Markdown
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