mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-28 14:30:39 +01:00
fix conditions
This commit is contained in:
parent
401094b6b2
commit
95f00b08c0
1 changed files with 15 additions and 13 deletions
|
@ -279,21 +279,23 @@ async function onSubmit(): Promise<void> {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
if (res.status === 204 && instance.emailRequiredForSignup) {
|
if (res.ok) {
|
||||||
os.alert({
|
if (res.status === 204 || instance.emailRequiredForSignup) {
|
||||||
type: 'success',
|
os.alert({
|
||||||
title: i18n.ts._signup.almostThere,
|
type: 'success',
|
||||||
text: i18n.tsx._signup.emailSent({ email: email.value }),
|
title: i18n.ts._signup.almostThere,
|
||||||
});
|
text: i18n.tsx._signup.emailSent({ email: email.value }),
|
||||||
emit('signupEmailPending');
|
});
|
||||||
} else if (res.status === 200) {
|
emit('signupEmailPending');
|
||||||
const resJson = (await res.json()) as Misskey.entities.SignupResponse;
|
} else {
|
||||||
if (_DEV_) console.log(resJson);
|
const resJson = (await res.json()) as Misskey.entities.SignupResponse;
|
||||||
|
if (_DEV_) console.log(resJson);
|
||||||
|
|
||||||
emit('signup', resJson);
|
emit('signup', resJson);
|
||||||
|
|
||||||
if (props.autoSet) {
|
if (props.autoSet) {
|
||||||
await login(resJson.token);
|
await login(resJson.token);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const resJson = (await res.json()) as {
|
const resJson = (await res.json()) as {
|
||||||
|
|
Loading…
Reference in a new issue