We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97f761d commit 95c1f38Copy full SHA for 95c1f38
1 file changed
server/controllers/project.controller/createProject.js
@@ -6,11 +6,7 @@ import {
6
} from '../../domain-objects/Project';
7
8
export default function createProject(req, res) {
9
- let projectValues = {
10
- user: req.user._id
11
- };
12
-
13
- projectValues = Object.assign(projectValues, req.body);
+ const projectValues = Object.assign({}, req.body, { user: req.user._id });
14
15
function sendFailure(err) {
16
res.status(400).json({ success: false });
0 commit comments