* delete action

feature: #6
This commit is contained in:
2023-01-11 20:36:20 +01:00
parent a3f98a1757
commit 15ab49ad7f
7 changed files with 140 additions and 11 deletions

View File

@@ -90,4 +90,18 @@ export async function createContract(contractId, contractName, contractClient, c
console.error(error)
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
}
export async function deleteContract(contractId) {
return HttpClient.delete('/contract', {
id: contractId
})
.then(resp => {
//TODO: send also auth token with request
return resp.data
})
.catch(error => {
console.error(error)
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}