Skip to content

Commit

Permalink
small fixes in ppublishedSchedule.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Jian committed Dec 8, 2023
1 parent 817e2fe commit 8e4c94f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 54 deletions.
5 changes: 2 additions & 3 deletions routes/publishedSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ publishedScheduleRouter.post('/', async (req, res) => {

// PUT/:id - Updates an existing row given an id
publishedScheduleRouter.put('/:id', async (req, res) => {

try {
const { id } = req.params;
const {
Expand Down Expand Up @@ -132,15 +131,15 @@ publishedScheduleRouter.put('/:id', async (req, res) => {
});

// DELETE/:id - deletes an existing row given an id
publishedScheduleRouter.put('/id', async (req, res) => {
publishedScheduleRouter.delete('/:id', async (req, res) => {
try {
const { id } = req.params;
await db.query(
`
DELETE FROM published_schedule
WHERE id = $1;
`,
[id]
[id],
);
res.status(200).send('Deleted row from Published Schedule');
} catch (err) {
Expand Down
51 changes: 0 additions & 51 deletions server/queries/published_schedule.sql

This file was deleted.

0 comments on commit 8e4c94f

Please sign in to comment.