feat: fix bug in pricing when signup by phone (#2316)

* fix: fix bug in pricing

* fix: remove log
This commit is contained in:
haiwu
2023-09-08 21:03:30 +08:00
committed by GitHub
parent c62588f9bc
commit d12088e8e7

View File

@ -182,6 +182,8 @@ class SignupPage extends React.Component {
AuthBackend.signup(values) AuthBackend.signup(values)
.then((res) => { .then((res) => {
if (res.status === "ok") { 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)) { if (Setting.hasPromptPage(application) && (!values.plan || !values.pricing)) {
AuthBackend.getAccount("") AuthBackend.getAccount("")
.then((res) => { .then((res) => {