Skip to content

Commit

Permalink
Merge pull request #25 from michacurri/develop
Browse files Browse the repository at this point in the history
status 500 error discovered in profileController.js:32
  • Loading branch information
michacurri authored Jan 3, 2021
2 parents 1208434 + 035d0d2 commit 00d4bd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/controllers/profileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = {
const profileRes = await Profile.findOne({ email })
.populate("workorders")
.exec();
console.log(`"profileRes.workorders": ${profileRes.workorders}`);
// console.log(`"profileRes.workorders": ${profileRes.workorders}`);
return profileRes;
} catch (err) {
throw err;
Expand Down
5 changes: 3 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ const mongoose = require("mongoose");

const DB_URI = process.env.DB_URI || "mongodb://localhost:27017/aero";
// const DB_URI = "mongodb://localhost:27017/aero";
const PORT = 5000;
const PORT = process.env.PORT || 5000;
// const PORT = 5000;

app.use(cookieParser());
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(
cors({
origin: "http://localhost:5000",
// origin: `https://aero-workorder-management.herokuapp.com`,
credentials: true,
exposedHeaders: ["Set-Cookie"],
allowedHeaders: ["Content-Type", "Authorization"],
Expand Down

0 comments on commit 00d4bd0

Please sign in to comment.