chore: use .then instead of await

This commit is contained in:
kolaente 2021-12-26 11:56:59 +01:00
parent e08c3a3594
commit ef69fd28b2
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
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
}