From b07b60f6bd0ff38e969adc018a3d0e4988ccf248 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.')
+ }
+}
@@ -219,6 +229,13 @@ const handleChange = () => {
+