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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dojo Project (HES-SO)
Projects
UI
DojoCLI
Commits
851b3bf8
Commit
851b3bf8
authored
1 year ago
by
vincent.steinman
Committed by
michael.minelli
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
split tag managers with tag submit manager
parent
b22b5d45
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NodeApp/src/managers/DojoBackendManager.ts
+11
-9
11 additions, 9 deletions
NodeApp/src/managers/DojoBackendManager.ts
with
11 additions
and
9 deletions
NodeApp/src/managers/DojoBackendManager.ts
+
11
−
9
View file @
851b3bf8
...
...
@@ -12,6 +12,7 @@ import * as Gitlab from '@gitbeaker/rest';
import
DojoBackendHelper
from
'
../sharedByClients/helpers/Dojo/DojoBackendHelper.js
'
;
import
GitlabPipelineStatus
from
'
../shared/types/Gitlab/GitlabPipelineStatus.js
'
;
import
Tags
from
'
../sharedByClients/models/Tag
'
;
import
TagSubmit
from
'
../sharedByClients/models/TagSubmit
'
;
class
DojoBackendManager
{
...
...
@@ -249,7 +250,7 @@ class DojoBackendManager {
return
false
;
}
}
//Around here
}
public
async
addTag
(
name
:
string
,
type
:
string
)
:
Promise
<
Tags
|
undefined
>
{
return
(
await
axios
.
post
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
ADD_TAG
),{
name
:
name
,
...
...
@@ -259,21 +260,22 @@ class DojoBackendManager {
public
async
deleteTag
(
name
:
string
)
:
Promise
<
Tags
>
{
return
(
await
axios
.
delete
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
DELETE_TAG
).
replace
(
'
{{tageName}}
'
,
name
))).
data
.
data
;
}
public
async
getProposeTag
(
state
:
string
)
:
Promise
<
Tag
s
|
undefined
>
{
return
(
await
axios
.
get
<
DojoBackendResponse
<
Tag
s
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tag
eNam
e}}
'
,
state
))).
data
.
data
;
public
async
getProposeTag
(
state
:
string
)
:
Promise
<
Tag
Submit
|
undefined
>
{
return
(
await
axios
.
get
<
DojoBackendResponse
<
Tag
Submit
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tag
Stat
e}}
'
,
state
))).
data
.
data
;
}
public
async
postProposeTag
(
name
:
string
,
type
:
string
)
:
Promise
<
Tag
s
|
undefined
>
{
return
(
await
axios
.
post
<
DojoBackendResponse
<
Tag
s
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tag
eNam
e}}
'
,
""
),{
public
async
postProposeTag
(
name
:
string
,
type
:
string
)
:
Promise
<
Tag
Submit
|
undefined
>
{
return
(
await
axios
.
post
<
DojoBackendResponse
<
Tag
Submit
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tag
Stat
e}}
'
,
""
),{
name
:
name
,
type
:
type
})).
data
.
data
;
}
public
async
answerProposeTag
(
name
:
string
,
state
:
string
)
:
Promise
<
Tags
|
undefined
>
{
return
(
await
axios
.
patch
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
ANSWER_TAG_PROPOSAL
).
replace
(
'
{{tagProposalName}}
'
,
name
),
{
state
:
state
public
async
answerProposeTag
(
name
:
string
,
type
:
string
,
state
:
string
,
detail
:
string
)
:
Promise
<
TagSubmit
|
undefined
>
{
return
(
await
axios
.
patch
<
DojoBackendResponse
<
TagSubmit
>>
(
this
.
getApiUrl
(
ApiRoute
.
ANSWER_TAG_PROPOSAL
).
replace
(
'
{{tagProposalName}}
'
,
name
),
{
type
:
type
,
state
:
state
,
detail
:
detail
})).
data
.
data
;
}
}
export
default
new
DojoBackendManager
();
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