chore: use .then instead of await

This commit is contained in:
kolaente 2021-12-26 11:56:59 +01:00
parent 343be4d5d6
commit 041f888492
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -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
} }