Skip to content

Commit

Permalink
add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitSerrano committed Oct 9, 2024
1 parent eec90f8 commit b37926b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions controllers/createConfController.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ const createConfWithDay = async (email, conferenceDay, userTimezoneOffset) => {
module.exports.createConf = async (req, res) => {
const confData = await oidcAuth.finishAuth(req)

const { email, durationInMinutes, conferenceDay, userTimezoneOffset } = confData
const { email, durationInMinutes, conferenceDay, userTimezoneOffset, error } = confData

if (!conferenceDay && !durationInMinutes) {
console.error("Login token contained no conferenceDay and no durationInMinutes. Cannot create conference.")
req.flash("error", "La conférence n'a pas pu être créée. Vous pouvez réessayer.")
req.flash("error", error || "La conférence n'a pas pu être créée. Vous pouvez réessayer.")
return res.redirect("/")
}

Expand Down

0 comments on commit b37926b

Please sign in to comment.