From 7347c37a9e442f124c6e8413545f38680af999f1 Mon Sep 17 00:00:00 2001 From: wancat Date: Mon, 17 Jun 2024 19:49:00 +0800 Subject: [PATCH] feat: add register guest button --- app/src/components/AuthForm.vue | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/src/components/AuthForm.vue b/app/src/components/AuthForm.vue index 7d05cb6..1f658af 100644 --- a/app/src/components/AuthForm.vue +++ b/app/src/components/AuthForm.vue @@ -83,6 +83,16 @@ const handleChange = () => { errorMessage.value = 'Something went wrong' } } + +const registerGuest = async () => { + try { + await api.post('/auth/register-guest') + router.push({ name: 'map' }) + } catch (err) { + console.error(err) + toast.error('Something went wrong.') + } +}