Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
55fbefce
Verified
Commit
55fbefce
authored
Sep 17, 2018
by
Sébastiaan Versteeg
Browse files
Add default language for url requests
parent
fde1d0f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/utils/url.js
View file @
55fbefce
...
...
@@ -50,7 +50,12 @@ export const apiRequest = (route, fetchOpts, params) => {
if
(
!
requestOptions
.
headers
)
{
requestOptions
.
headers
=
{};
}
requestOptions
.
headers
[
'
Accept-Language
'
]
=
locale
;
if
(
locale
.
includes
(
'
en
'
)
||
locale
.
includes
(
'
nl
'
))
{
requestOptions
.
headers
[
'
Accept-Language
'
]
=
locale
;
}
else
{
requestOptions
.
headers
[
'
Accept-Language
'
]
=
'
en
'
;
}
let
query
=
''
;
if
(
params
!==
null
&&
params
===
Object
(
params
))
{
...
...
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