From ff268901cb0652bc66773b7c0151b2a73095f551 Mon Sep 17 00:00:00 2001 From: sahayana Date: Fri, 24 Nov 2023 17:03:05 +0900 Subject: [PATCH] =?UTF-8?q?=EC=88=98=EC=A0=95:=20signup=20js=20url=20?= =?UTF-8?q?=EC=88=98=EC=A0=95,=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20?= =?UTF-8?q?=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/account/services/user_service.py | 1 - static/js/accounts/signup-api.js | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/account/services/user_service.py b/apps/account/services/user_service.py index 6002362..137f5e1 100644 --- a/apps/account/services/user_service.py +++ b/apps/account/services/user_service.py @@ -28,7 +28,6 @@ def create_single_user( if img: UserProfileImage.objects.create(user=user, img=img) - # TODO: Celery 비동기 처리 transaction.on_commit(lambda: send_email_verification.delay(user.id)) return user diff --git a/static/js/accounts/signup-api.js b/static/js/accounts/signup-api.js index 8c5f852..0b53f09 100644 --- a/static/js/accounts/signup-api.js +++ b/static/js/accounts/signup-api.js @@ -36,7 +36,7 @@ function signUp() { let formData = new FormData(); formData.append("nickname", nickName); - formData.append("password2", password); + formData.append("password", password); formData.append("email", email); formData.append("img", profileImg); formData.append("bio", bio); @@ -49,7 +49,7 @@ function signUp() { $.ajax({ type: 'POST', - url: '/accounts/signup/', + url: 'http://127.0.0.1:8000/account/v1/signup', cache: false, contentType: false, processData: false, @@ -69,7 +69,11 @@ function signUp() { return; } + }, + error: function (response, status, error) { + console.log(error) } + }) } @@ -82,7 +86,7 @@ function checkDuplicated() { $.ajax({ type: "GET", - url: `/accounts/signup/check/`, + url: `/account/v1/signup/check`, data: { email: email }, success: function (response) { // 서버에서 받은 response에서 duplicated 값이 true이면 중복확인 텍스트를 노출합니다.