Skip to content

Commit

Permalink
pass test
Browse files Browse the repository at this point in the history
  • Loading branch information
pkzstar committed Apr 25, 2024
1 parent eba1501 commit 69be261
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ connectToDatabase()
app.post('/submitEvent', async (req, res) => {
const { upcomingTitle, upcomingDate, upcomingLocation, upcomingUrl, upcomingImg, upcomingDescription } = req.body;
const query = 'INSERT INTO events (title, date, location, url, image, description) VALUES ($1, $2, $3, $4, $5, $6, $7)';
const values = [upcomingTitle, upcomingDate, upcomingLocation, upcomingUrl, upcomingImg, upcomingDescription, hashedPassword];
const values = [upcomingTitle, upcomingDate, upcomingLocation, upcomingUrl, upcomingImg, upcomingDescription, process.env.Hashed_Form_Pass];

try {
// Validate date format here if needed before inserting into the database
Expand Down
1 change: 1 addition & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function createEventsTable() {
url VARCHAR(255),
image VARCHAR(255),
description TEXT
hashed_password VARCHAR(255) NOT NULL
)
`);
console.log('Table created successfully');
Expand Down

0 comments on commit 69be261

Please sign in to comment.