Skip to content

Periklis K#139

Open
PerikK wants to merge 31 commits intoboolean-uk:mainfrom
PerikK:main
Open

Periklis K#139
PerikK wants to merge 31 commits intoboolean-uk:mainfrom
PerikK:main

Conversation

@PerikK
Copy link

@PerikK PerikK commented Jul 3, 2024

No description provided.

Comment on lines 52 to 54
throw new DataNotFoundError(
"No customer with the provided ID exists"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throw new DataNotFoundError("No customer with the provided ID exists")

Comment on lines +46 to +48
const existingCustomer = customersList.find(
(cus) => cus.id === reqId
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const existingCustomer = customersList.find((cus) => cus.id === reqId)

res.status(201).json({ customer: updatedCustomer })
} catch (e) {
console.log(e)
next(e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

res.status(500).json({ error: e.message })


const updateMovie = async (req, res, next) => {
const reqId = Number(req.params.id)
const updateInfo = req.body
Copy link
Contributor

@vherus vherus Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const { title, runtimeMins, screenings } = req.body

@@ -1,21 +1,51 @@
const express = require('express');
const app = express();
const express = require("express")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require('express-async-errors');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants