done refactoring User controller + UserModel
This commit is contained in:
parent
766b52dce1
commit
f3d506c005
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ app.use('/cart', cartRouter);
|
||||||
|
|
||||||
app.all('*', (req, res, next) => {
|
app.all('*', (req, res, next) => {
|
||||||
// res.status(404).json({ error: 'Route not found' });
|
// res.status(404).json({ error: 'Route not found' });
|
||||||
const error = new ApiError('Route not found');
|
const error = new ApiError('Are you lost?');
|
||||||
error.statusCode = 404;
|
error.statusCode = 404;
|
||||||
error.status = 'fail';
|
error.status = 'fail';
|
||||||
next(error)
|
next(error)
|
||||||
|
|
Loading…
Reference in a new issue