Skip to content

Commit d222e15

Browse files
committed
Simplify useApi query reactivity
1 parent 76a0129 commit d222e15

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

frontend/pages/reset-password.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,9 @@ async function requestPasswordReset() {
3737
}
3838
3939
const passwordResetResponse = await useApi("/password-reset", {
40-
query: {
41-
// Using a getter makes refreshing the request use the current token value.
42-
// I'd use a simple arrow function instead, but that isn't supported
43-
// (despite the types saying it is, which is a Nuxt bug).
44-
get token() {
45-
return route.query.token;
46-
},
47-
},
40+
query: computed(() => ({
41+
token: route.query.token,
42+
})),
4843
4944
immediate: route.query.token !== undefined,
5045

0 commit comments

Comments
 (0)