Add and remove clones from ecosystem
This commit is contained in:
1 parent
ecf365798f
commit
5cdaca4a6d
5 files changed
+122
-7
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import logger from '../config/logger'
|
||||
import axios from 'axios'
|
||||
|
||||
const removeBotMutation = async (authorization, bot) => {
|
||||
logger.debug('removeBotMutation -> Entering function.')
|
||||
|
||||
let response = await axios({
|
||||
url: process.env.GATEWAY_ENDPOINT,
|
||||
method: 'post',
|
||||
data: {
|
||||
query: `
|
||||
mutation web_RemoveBot($bot: web_BotInput){
|
||||
web_RemoveBot(bot: $bot){
|
||||
codeName
|
||||
cloneId
|
||||
}
|
||||
}
|
||||
`,
|
||||
variables: {
|
||||
bot
|
||||
}
|
||||
},
|
||||
headers: {
|
||||
authorization: authorization
|
||||
}
|
||||
})
|
||||
|
||||
if (response.data.errors) {
|
||||
throw response.data.errors
|
||||
}
|
||||
|
||||
return response.data.data.web_RemoveBot
|
||||
}
|
||||
|
||||
export default removeBotMutation
|
||||
Reference in new issue
Block a user