* add new comment

feature: #11
This commit is contained in:
2023-01-12 14:26:48 +01:00
parent 15ab49ad7f
commit 71331b046d
3 changed files with 45 additions and 2 deletions

View File

@@ -105,3 +105,15 @@ export async function deleteContract(contractId) {
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
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)
})
}