Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nickviola committed Dec 1, 2023
1 parent 1a5911f commit a0a3747
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions backend/src/api/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,13 @@ export const getByState = wrapHandler(async (event) => {
export const register = wrapHandler(async (event) => {
const body = await validateBody(NewUser, event.body);
const newUser = {
'firstName': body.firstName,
'lastName': body.lastName,
'email': body.email.toLowerCase(),
'userType': UserType.STANDARD,
'state': body.state,
'regionId': REGION_STATE_MAP[body.state],
'invitePending': true,
firstName: body.firstName,
lastName: body.lastName,
email: body.email.toLowerCase(),
userType: UserType.STANDARD,
state: body.state,
regionId: REGION_STATE_MAP[body.state],
invitePending: true,

Check failure on line 571 in backend/src/api/users.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `,`
};
console.log(JSON.stringify(newUser));

Expand Down Expand Up @@ -602,7 +602,7 @@ export const register = wrapHandler(async (event) => {
sendUserNotificationEmail(
newUser.email,
'Crossfeed Registration Pending',
newUser.firstName,
newUser.firstName,
newUser.lastName,
'/app/src/email_templates/crossfeed_registration_notification.html'
);
Expand Down Expand Up @@ -657,18 +657,20 @@ export const registrationApproval = wrapHandler(async (event) => {

// Connect to the database
await connectToDatabase();

const user = await User.findOne(userId);
if (!user) {
return NotFound;
}

// Send email notification
sendUserNotificationEmail(user.email,
sendUserNotificationEmail(
user.email,

Check failure on line 668 in backend/src/api/users.ts

View workflow job for this annotation

GitHub Actions / lint

Delete `·`
'Crossfeed Registration Approved',
user.firstName,
user.lastName,
'/app/src/email_templates/crossfeed_approval_notification.html');
'/app/src/email_templates/crossfeed_approval_notification.html'
);

// TODO: Handle Response Output
return {
Expand Down

0 comments on commit a0a3747

Please sign in to comment.