edit cooperative page and functionality
This commit is contained in:
@@ -38,13 +38,17 @@ export default {
|
||||
async logout() {
|
||||
await this.auth.logout()
|
||||
},
|
||||
//TODO: check if cooperative is validated is working
|
||||
async checkIfCoopValidated() {
|
||||
const config = useRuntimeConfig()
|
||||
const accessToken = this.auth.access
|
||||
const result = await $fetch('my_company/', {
|
||||
baseURL: config.public.baseURL,
|
||||
method: 'GET',
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`
|
||||
}
|
||||
})
|
||||
this.coopIsValidated = result.data.company.is_validated
|
||||
this.coopIsValidated = result.company.is_validated
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user