This commit is contained in:
pawan-dot 2022-08-08 16:32:05 +05:30
parent 79f0c312e1
commit 3263b9d599
4 changed files with 9 additions and 9 deletions

View File

@ -207,7 +207,7 @@ export const setStatus = async (req, res) => {
try {
const id = req.params.id;
if (!id) return res.status(400).json({ message: 'id is required' });
// console.log(id)
const directory = await directoryModel.findById(req.params.id)
if (!directory)

View File

@ -70,7 +70,7 @@ const directorySchema = new mongoose.Schema(
userId: {
type: mongoose.Schema.ObjectId,
ref: "User",
required: true,
// required: true,
},
}, { timestamps: true }

View File

@ -36,11 +36,11 @@ const server = app.listen(process.env.PORT, () => {
// Unhandled Promise Rejection
process.on("unhandledRejection", (err) => {
console.log(`Error: ${err.message}`);
console.log(`Shutting down the server due to Unhandled Promise Rejection`);
// process.on("unhandledRejection", (err) => {
// console.log(`Error: ${err.message}`);
// console.log(`Shutting down the server due to Unhandled Promise Rejection`);
server.close(() => {
process.exit(1);
});
});
// server.close(() => {
// process.exit(1);
// });
// });

BIN
tmp/tmp-1-1659956023678 Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB