chore: use .then instead of await

This commit is contained in:
kolaente
2022-04-02 17:37:51 +02:00
parent 343be4d5d6
commit 041f888492
+5 -2
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
}