diff --git a/spec/controllers/api/users/users_controller_spec.rb b/spec/controllers/api/users/users_controller_spec.rb index 97d6d4678..c07b39864 100644 --- a/spec/controllers/api/users/users_controller_spec.rb +++ b/spec/controllers/api/users/users_controller_spec.rb @@ -139,7 +139,7 @@ describe Api::UsersController do .to include(Users::ResendVerification::ALREADY_VERIFIED) end - it 'refuses to send token to a user if they are already verified' do + it 're-sends verification email' do unverified = User.create!(email: Faker::Internet.email, password: "password123", password_confirmation: "password123") diff --git a/webpack/api/api.ts b/webpack/api/api.ts index e52c6a82f..028d9884d 100644 --- a/webpack/api/api.ts +++ b/webpack/api/api.ts @@ -106,7 +106,7 @@ export class API { get devicePath() { return `${this.baseUrl}/api/device/`; } /** /api/users/ */ get usersPath() { return `${this.baseUrl}/api/users/`; } - /** /api/users/resend_verification?id=EMAIL */ + /** /api/users/resend_verification */ get userResendConfirmationPath() { return this.usersPath + "/resend_verification"; } diff --git a/webpack/front_page/front_page.tsx b/webpack/front_page/front_page.tsx index 94b5c0ca2..6e89627ad 100644 --- a/webpack/front_page/front_page.tsx +++ b/webpack/front_page/front_page.tsx @@ -114,9 +114,8 @@ export class FrontPage extends React.Component<{}, Partial> { this.setState({ showServerOpts: !this.state.showServerOpts }); } - toggleForgotPassword = () => { - this.setState({ activePanel: "forgotPassword" }); - } + toggleForgotPassword = () => this.setState({ activePanel: "forgotPassword" }); + submitForgotPassword = (e: React.FormEvent) => { e.preventDefault(); diff --git a/webpack/front_page/interfaces.ts b/webpack/front_page/interfaces.ts index 83eea4cbc..b90cc87de 100644 --- a/webpack/front_page/interfaces.ts +++ b/webpack/front_page/interfaces.ts @@ -11,7 +11,7 @@ export interface FrontPageState { forgotPasswordEmail?: string; agreeToTerms: boolean; activePanel: - | "login" /** Render default login panel */ - | "forgotPassword" /** Render forgotten password pane */ - | "resendVerificationEmail" /** Render the "resend verification" panel. */; + | "resendVerificationEmail" /** Render the "resend verification" panel. */ + | "login" /** Render default login panel */ + | "forgotPassword" /** Render forgotten password pane */; }