Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
grady
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Maximilian Michal
grady
Commits
f755ec8c
There was a problem fetching the pipeline summary.
Commit
f755ec8c
authored
7 years ago
by
robinwilliam.hundt
Browse files
Options
Downloads
Patches
Plain Diff
axios base url and vuex strict mode dependant on NODE_ENV
parent
b6a34a1c
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!53
axios base url and vuex strict mode dependant on NODE_ENV
Pipeline
#
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/api.js
+9
-1
9 additions, 1 deletion
frontend/src/api.js
frontend/src/store/store.js
+1
-1
1 addition, 1 deletion
frontend/src/store/store.js
with
10 additions
and
2 deletions
frontend/src/api.js
+
9
−
1
View file @
f755ec8c
...
...
@@ -6,8 +6,16 @@ function addFieldsToUrl ({url, fields = []}) {
return
fields
.
length
>
0
?
url
+
'
?fields=pk,
'
+
fields
:
url
}
function
getInstanceBaseUrl
()
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
return
`https://
${
window
.
location
.
host
}${
window
.
location
.
pathname
}
`
}
else
{
return
'
http://localhost:8000/
'
}
}
let
ax
=
axios
.
create
({
baseURL
:
'
http://localhost:8000/
'
,
baseURL
:
getInstanceBaseUrl
()
,
headers
:
{
'
Authorization
'
:
'
JWT
'
+
sessionStorage
.
getItem
(
'
token
'
)}
})
...
...
This diff is collapsed.
Click to expand it.
frontend/src/store/store.js
+
1
−
1
View file @
f755ec8c
...
...
@@ -30,7 +30,7 @@ export const persistedStateKey = 'grady'
const
store
=
new
Vuex
.
Store
({
// TODO only enable this in dev and not in deployment (use env variable)
strict
:
true
,
strict
:
process
.
env
.
NODE_ENV
===
'
development
'
,
modules
:
{
authentication
,
studentPage
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment