From 3d22ee9cfa335ca7aaf4c02a8fcc90800095b73e Mon Sep 17 00:00:00 2001 From: QiTao Weng Date: Sun, 10 Apr 2022 05:12:33 -0500 Subject: [PATCH] Fix delete function and type --- src/components/Login.vue | 4 ++-- src/pages/Editor.vue | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/components/Login.vue b/src/components/Login.vue index 0df9e77..5c020fa 100644 --- a/src/components/Login.vue +++ b/src/components/Login.vue @@ -110,11 +110,11 @@ onMounted(() => {

- {{ isRegistration ? 'Have an account?' : 'Not reigistered?' }} + {{ isRegistration ? 'Have an account?' : 'Not registered?' }} {{ isRegistration ? 'Login' : 'Created an Account' }} + >{{ isRegistration ? 'Login' : 'Create an Account' }}

diff --git a/src/pages/Editor.vue b/src/pages/Editor.vue index 324262a..a0cc594 100644 --- a/src/pages/Editor.vue +++ b/src/pages/Editor.vue @@ -385,16 +385,7 @@ const deleteEditorPage = async (close = false) => { }, body: JSON.stringify(params), }) - - const result = (await response.json()) as unknown as any - if (!result.success) { - return alert('Failed to delete page: ' + result.message) - } - - editorPageId.value = result.data.pageId - if ( close ) { - await router.push('/Listings') - } + await router.push('/Listings') } const loadEditorPage = async () => { @@ -597,7 +588,7 @@ onMounted(() => { - +