chore: use .then instead of await
This commit is contained in:
parent
343be4d5d6
commit
041f888492
1 changed files with 5 additions and 2 deletions
|
@ -80,9 +80,12 @@ import CaldavTokenModel from '@/models/caldavToken'
|
||||||
|
|
||||||
const service = new CaldavTokenService()
|
const service = new CaldavTokenService()
|
||||||
|
|
||||||
async function useTokens(): ref<CaldavTokenModel[]> {
|
function useTokens(): ref<CaldavTokenModel[]> {
|
||||||
const tokens = ref<CaldavTokenModel[]>([])
|
const tokens = ref<CaldavTokenModel[]>([])
|
||||||
tokens.value = await service.getAll()
|
service.getAll()
|
||||||
|
.then((t: CaldavTokenModel[]) => {
|
||||||
|
tokens.value = t
|
||||||
|
})
|
||||||
return tokens
|
return tokens
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue