Skip to content

Commit

Permalink
edited catalog put request
Browse files Browse the repository at this point in the history
  • Loading branch information
michellelin1 committed Mar 24, 2024
1 parent 18afe5a commit 7ba006b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions routes/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ catalogRouter.put('/:id', async (req, res) => {
`UPDATE catalog SET
${host ? 'host = $(host), ' : ''}
${title ? 'title = $(title),' : ''}
${eventType ? 'event_type = $(eventType), ' : ''}
${subject ? 'subject = $(subject), ' : ''}
${eventType ? 'event_type = $(eventType)::event[], ' : ''}
${subject ? 'subject = $(subject)::subject[], ' : ''}
${description ? 'description = $(description), ' : ''}
${year ? 'year = $(year), ' : ''}
${year ? 'year = $(year)::year[], ' : ''}
${location ? 'location = $(location), ' : ''}
${season ? 'season = $(season), ' : ''}
${season ? 'season = $(season)::season[], ' : ''}
id = '${id}'
WHERE id = '${id}'
RETURNING *;`,
Expand Down

0 comments on commit 7ba006b

Please sign in to comment.