From 343be4d5d6048a89d42b33433aeff7d458a680de Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 26 Dec 2021 11:54:27 +0100 Subject: [PATCH] chore: directly use newToken.value --- src/views/user/settings/Caldav.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/user/settings/Caldav.vue b/src/views/user/settings/Caldav.vue index 4e3b0bdb..945a03f3 100644 --- a/src/views/user/settings/Caldav.vue +++ b/src/views/user/settings/Caldav.vue @@ -101,9 +101,8 @@ const username = computed(() => store.state.auth.info?.username) const newToken = ref(null) async function createToken() { - const r = await service.create({}) - tokens.value.push(r) - newToken.value = r + newToken.value = await service.create({}) + tokens.value.push(newToken.value) } async function deleteToken(token: CaldavTokenModel) {