* fixes of error catching in posting comment
* function move to next step feature: #12
This commit is contained in:
@@ -93,7 +93,7 @@ export async function createContract(contractId, contractName, contractClient, c
|
||||
}
|
||||
|
||||
export async function deleteContract(contractId) {
|
||||
return HttpClient.delete('/contract', {
|
||||
return HttpClient.delete('/contract/delete', {
|
||||
id: contractId
|
||||
})
|
||||
.then(resp => {
|
||||
@@ -106,14 +106,12 @@ export async function deleteContract(contractId) {
|
||||
})
|
||||
}
|
||||
|
||||
export async function saveComment(comment) {
|
||||
return HttpClient.post('/comments', comment)
|
||||
.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)
|
||||
})
|
||||
export async function saveComment(comment, contractId) {
|
||||
return HttpClient.post('/contract/' + contractId + '/comments', comment)
|
||||
}
|
||||
|
||||
export async function moveToNextStep(contractId) {
|
||||
return HttpClient.post('/contract/nextstep', {
|
||||
id: contractId
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user