* create modal

feature: #7
This commit is contained in:
2023-01-11 18:13:38 +01:00
parent 19b3211bde
commit a3f98a1757
10 changed files with 205 additions and 13 deletions

View File

@@ -74,3 +74,20 @@ export async function misapply(contractID) {
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
export async function createContract(contractId, contractName, contractClient, contractPassword) {
return HttpClient.post('/contract/create', {
id: contractId,
name: contractName,
client: contractClient,
password: contractPassword
})
.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)
})
}