* almost ready to release

This commit is contained in:
2023-01-16 22:38:22 +01:00
parent 7d03a8563a
commit 95d8d45919
6 changed files with 265 additions and 17 deletions

View File

@@ -87,14 +87,18 @@ export async function applyContract(contractID, prefRole, userName, userPhone, u
}
export async function misapply(contractID) {
return HttpClient.post('/contract/' + contractID + '/misapply', {
id : contractID,
email : store.state.keycloak.keycloak.tokenParsed.email
}, {
headers: {
Authorization: 'Bearer ' + store.state.keycloak.keycloak.token
return HttpClient.post(
'/contract/' + contractID + '/misapply',
{
id: contractID,
email: store.state.keycloak.keycloak.tokenParsed.email
},
{
headers: {
Authorization: 'Bearer ' + store.state.keycloak.keycloak.token
}
}
})
)
.then(resp => {
//TODO: send also auth token with request
return resp.data
@@ -205,3 +209,25 @@ export async function getAmountOfStatuses(token) {
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
export async function setupContract(conractId, data) {
return HttpClient.put(
'/contract/' + conractId + '/setup',
{
data
},
{
headers: {
Authorization: 'Bearer ' + store.state.keycloak.keycloak.token
}
}
)
.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)
})
}