chore: use .then instead of await

This commit is contained in:
kolaente 2021-12-26 11:56:59 +01:00 committed by Dominik Pschenitschni
parent f2005a9826
commit 0c4253be3a
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
1 changed files with 5 additions and 2 deletions

View File

@ -80,9 +80,12 @@ import CaldavTokenModel from '@/models/caldavToken'
const service = new CaldavTokenService()
async function useTokens(): ref<CaldavTokenModel[]> {
function useTokens(): ref<CaldavTokenModel[]> {
const tokens = ref<CaldavTokenModel[]>([])
tokens.value = await service.getAll()
service.getAll()
.then((t: CaldavTokenModel[]) => {
tokens.value = t
})
return tokens
}