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
b22b5d45
Commit
b22b5d45
authored
1 year ago
by
vincent.steinman
Committed by
michael.minelli
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix param/body for add, delete
parent
e0a8926d
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
+20
-11
20 additions, 11 deletions
NodeApp/src/managers/DojoBackendManager.ts
with
20 additions
and
11 deletions
NodeApp/src/managers/DojoBackendManager.ts
+
20
−
11
View file @
b22b5d45
...
@@ -11,6 +11,7 @@ import DojoStatusCode from '../shared/types/Dojo/DojoStatusCode.js';
...
@@ -11,6 +11,7 @@ import DojoStatusCode from '../shared/types/Dojo/DojoStatusCode.js';
import
*
as
Gitlab
from
'
@gitbeaker/rest
'
;
import
*
as
Gitlab
from
'
@gitbeaker/rest
'
;
import
DojoBackendHelper
from
'
../sharedByClients/helpers/Dojo/DojoBackendHelper.js
'
;
import
DojoBackendHelper
from
'
../sharedByClients/helpers/Dojo/DojoBackendHelper.js
'
;
import
GitlabPipelineStatus
from
'
../shared/types/Gitlab/GitlabPipelineStatus.js
'
;
import
GitlabPipelineStatus
from
'
../shared/types/Gitlab/GitlabPipelineStatus.js
'
;
import
Tags
from
'
../sharedByClients/models/Tag
'
;
class
DojoBackendManager
{
class
DojoBackendManager
{
...
@@ -248,21 +249,29 @@ class DojoBackendManager {
...
@@ -248,21 +249,29 @@ class DojoBackendManager {
return
false
;
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
,
type
:
type
})).
data
.
data
;
}
}
public
async
addTag
(
name
:
string
,
type
:
string
)
:
Promise
<
User
>
{
public
async
deleteTag
(
name
:
string
)
:
Promise
<
Tags
>
{
return
(
await
axios
.
post
<
DojoBackendResponse
<
User
>>
(
this
.
getApiUrl
(
ApiRoute
.
ADD_TAG
).
replace
(
'
{{tageName}}
'
,
name
).
replace
(
'
{{tagType}}
'
,
type
))).
data
.
data
;
return
(
await
axios
.
delete
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
DELETE_TAG
).
replace
(
'
{{tageName}}
'
,
name
))).
data
.
data
;
}
public
async
deleteTag
(
name
:
string
)
:
Promise
<
User
>
{
return
(
await
axios
.
delete
<
DojoBackendResponse
<
User
>>
(
this
.
getApiUrl
(
ApiRoute
.
DELETE_TAG
).
replace
(
'
{{tageName}}
'
,
name
))).
data
.
data
;
}
}
public
async
getProposeTag
(
nam
e
:
string
)
:
Promise
<
User
>
{
public
async
getProposeTag
(
stat
e
:
string
)
:
Promise
<
Tags
|
undefined
>
{
return
(
await
axios
.
get
<
DojoBackendResponse
<
User
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tageName}}
'
,
nam
e
))).
data
.
data
;
return
(
await
axios
.
get
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tageName}}
'
,
stat
e
))).
data
.
data
;
}
}
public
async
postProposeTag
(
name
:
string
,
type
:
string
)
:
Promise
<
User
>
{
public
async
postProposeTag
(
name
:
string
,
type
:
string
)
:
Promise
<
Tags
|
undefined
>
{
return
(
await
axios
.
post
<
DojoBackendResponse
<
User
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tageName}}
'
,
name
).
replace
(
'
{{tagType}}
'
,
type
))).
data
.
data
;
return
(
await
axios
.
post
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
PROPOSE_TAG
).
replace
(
'
{{tageName}}
'
,
""
),{
name
:
name
,
type
:
type
})).
data
.
data
;
}
}
public
async
answerProposeTag
(
name
:
string
)
:
Promise
<
User
>
{
public
async
answerProposeTag
(
name
:
string
,
state
:
string
)
:
Promise
<
Tags
|
undefined
>
{
return
(
await
axios
.
patch
<
DojoBackendResponse
<
User
>>
(
this
.
getApiUrl
(
ApiRoute
.
ANSWER_TAG_PROPOSAL
).
replace
(
'
{{tageName}}
'
,
name
))).
data
.
data
;
return
(
await
axios
.
patch
<
DojoBackendResponse
<
Tags
>>
(
this
.
getApiUrl
(
ApiRoute
.
ANSWER_TAG_PROPOSAL
).
replace
(
'
{{tagProposalName}}
'
,
name
),
{
state
:
state
})).
data
.
data
;
}
}
}
}
...
...
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