From d12088e8e7448c6d9544f29e0f1605616b5f076e Mon Sep 17 00:00:00 2001 From: haiwu <54203997+Chinoholo0807@users.noreply.github.com> Date: Fri, 8 Sep 2023 21:03:30 +0800 Subject: [PATCH] feat: fix bug in pricing when signup by phone (#2316) * fix: fix bug in pricing * fix: remove log --- web/src/auth/SignupPage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/src/auth/SignupPage.js b/web/src/auth/SignupPage.js index 2b43b87f..b3bc3353 100644 --- a/web/src/auth/SignupPage.js +++ b/web/src/auth/SignupPage.js @@ -182,6 +182,8 @@ class SignupPage extends React.Component { AuthBackend.signup(values) .then((res) => { if (res.status === "ok") { + // the user's id will be returned by `signup()`, if user signup by phone, the `username` in `values` is undefined. + values.username = res.data.split("/")[1]; if (Setting.hasPromptPage(application) && (!values.plan || !values.pricing)) { AuthBackend.getAccount("") .then((res) => {