Commit 1ea9adf8 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

add deleteProjectById function

parent cee2980f
......@@ -66,6 +66,24 @@ var gitlab = {
data: err.response.data
})
},
deleteProjectById: function(projectId){
// https://docs.gitlab.com/ee/api/projects.html#delete-project
return axios({
method: 'delete',
url: 'https://transfer.hft-stuttgart.de/gitlab/api/v4/projects/'+projectId,
headers: {
'Authorization': 'Bearer '+config.gitlab.token_readWriteProjects
}
})
.then(res => res = {
error: false,
data: res.data
})
.catch(err => res = {
error: true,
data: err.response.data
})
},
getUserProjects: async function(gitlabUserId) {
return axios({
method: 'get',
......@@ -96,7 +114,6 @@ var gitlab = {
.then(res => res.data[0].status)
.catch(err => console.error(err))
},
// delete peoject: https://docs.gitlab.com/ee/api/projects.html#delete-project
//
// test GraphQL
getGraphqlTest: function(callback) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment