Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendonKupsch1 committed Dec 8, 2024
2 parents 8960688 + 78487eb commit ddd8c81
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,6 @@ app.get('/committees', async (req, res) => {
}
);

// Correct route handler with both req and res
app.get('/committees', async (req, res) => {
try {
const result = await client.query('SELECT Cname FROM Committees');
console.log('Fetched committees:', result.rows); // Add this line to log the fetched data
res.json(result.rows);
} catch (err) {
console.error('Error fetching committees:', err);
res.status(500).json({ message: 'Server error' });
}
}
);

// Route to fetch school names
app.get('/schools', async (req, res) => {
try {
Expand Down

0 comments on commit ddd8c81

Please sign in to comment.