Skip to content

Commit

Permalink
Fix errors, successful signup
Browse files Browse the repository at this point in the history
  • Loading branch information
Guysnacho committed Sep 18, 2024
1 parent 149cc3e commit 988e9fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions terraform/lib/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const handleLogin = (email, password, creds) => {
* @param {{ method: "SIGNUP", email: string, password: string, fname: string, lname: string }} payload
* @param {{username: string, password: string}} creds
*/
const handleSignUp = async (payload, creds) => {
const handleSignUp = async ({ email, password, fname, lname }, creds) => {
console.log("Handling sign up");

const sql = postgres({
Expand All @@ -125,7 +125,6 @@ const handleSignUp = async (payload, creds) => {
host: process.env.db_host,
connection: {
application_name: process.env.AWS_LAMBDA_FUNCTION_NAME,
idle_session_timeout: 30,
},
});

Expand All @@ -147,7 +146,7 @@ const handleSignUp = async (payload, creds) => {
console.error(err);
return {
statusCode: 500,
statusDescription: error.message,
statusDescription: err.message,
};
});

Expand Down

0 comments on commit 988e9fb

Please sign in to comment.