Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DojoCLI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoCLI
Commits
5364c1a8
Commit
5364c1a8
authored
1 year ago
by
michael.minelli
Browse files
Options
Downloads
Patches
Plain Diff
Config => Move gitlab URL to shared
parent
93e621ac
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
NodeApp/src/managers/GitlabManager.ts
+8
-8
8 additions, 8 deletions
NodeApp/src/managers/GitlabManager.ts
NodeApp/src/managers/HttpManager.ts
+2
-1
2 additions, 1 deletion
NodeApp/src/managers/HttpManager.ts
with
10 additions
and
9 deletions
NodeApp/src/managers/GitlabManager.ts
+
8
−
8
View file @
5364c1a8
...
@@ -4,14 +4,14 @@ import axios from 'axios';
...
@@ -4,14 +4,14 @@ import axios from 'axios';
import
ora
from
'
ora
'
;
import
ora
from
'
ora
'
;
import
GitlabUser
from
'
../shared/types/Gitlab/GitlabUser
'
;
import
GitlabUser
from
'
../shared/types/Gitlab/GitlabUser
'
;
import
GitlabRoute
from
'
../shared/types/Gitlab/GitlabRoute
'
;
import
GitlabRoute
from
'
../shared/types/Gitlab/GitlabRoute
'
;
import
Clients
SharedConfig
from
'
../shared
ByClients
/config/
Clients
SharedConfig
'
;
import
SharedConfig
from
'
../shared/config/SharedConfig
'
;
class
GitlabManager
{
class
GitlabManager
{
private
_token
:
string
|
null
=
null
;
private
_token
:
string
|
null
=
null
;
private
getApiUrl
(
route
:
GitlabRoute
):
string
{
private
getApiUrl
(
route
:
GitlabRoute
):
string
{
return
`
${
Clients
SharedConfig
.
gitlab
.
apiURL
}${
route
}
`
;
return
`
${
SharedConfig
.
gitlab
.
apiURL
}${
route
}
`
;
}
}
get
isLogged
():
boolean
{
get
isLogged
():
boolean
{
...
...
This diff is collapsed.
Click to expand it.
NodeApp/src/managers/HttpManager.ts
+
2
−
1
View file @
5364c1a8
...
@@ -9,6 +9,7 @@ import DojoBackendResponse from '../shared/types/Dojo/DojoBackendResp
...
@@ -9,6 +9,7 @@ import DojoBackendResponse from '../shared/types/Dojo/DojoBackendResp
import
DojoStatusCode
from
'
../shared/types/Dojo/DojoStatusCode
'
;
import
DojoStatusCode
from
'
../shared/types/Dojo/DojoStatusCode
'
;
import
boxen
from
'
boxen
'
;
import
boxen
from
'
boxen
'
;
import
Config
from
'
../config/Config
'
;
import
Config
from
'
../config/Config
'
;
import
SharedConfig
from
'
../shared/config/SharedConfig
'
;
class
HttpManager
{
class
HttpManager
{
...
@@ -41,7 +42,7 @@ class HttpManager {
...
@@ -41,7 +42,7 @@ class HttpManager {
config
.
headers
[
'
client-version
'
]
=
version
;
config
.
headers
[
'
client-version
'
]
=
version
;
}
}
if
(
GitlabManager
.
isLogged
&&
config
.
url
&&
config
.
url
.
indexOf
(
Clients
SharedConfig
.
gitlab
.
apiURL
)
!==
-
1
)
{
if
(
GitlabManager
.
isLogged
&&
config
.
url
&&
config
.
url
.
indexOf
(
SharedConfig
.
gitlab
.
apiURL
)
!==
-
1
)
{
config
.
headers
[
'
PRIVATE-TOKEN
'
]
=
GitlabManager
.
token
;
config
.
headers
[
'
PRIVATE-TOKEN
'
]
=
GitlabManager
.
token
;
}
}
...
...
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