Skip to content

Commit a793771

Browse files
committed
Refine the add emails form to take the user back to the members page rather than their own
1 parent f739c37 commit a793771

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/commands/members/add-email-form.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ import {failureWithStatus} from '../../types/failure-with-status';
1010
import {StatusCodes} from 'http-status-codes';
1111

1212
type ViewModel = {
13-
user: User;
14-
memberNumber: number;
13+
user: User; // The user logged in
14+
memberNumber: number; // The user we are updating the email for.
15+
16+
// TODO - Show the emails already registered for this user.
1517
};
1618

1719
const renderForm = (viewModel: ViewModel) =>
1820
pipe(
1921
html`
2022
<h1>Add email</h1>
21-
<form action="?next=/me" method="post">
23+
<form action="?next=/member/${viewModel.memberNumber}" method="post">
2224
<label for="email">Email address</label>
2325
<input type="email" name="email" id="email" />
2426
<input

0 commit comments

Comments
 (0)