Skip to content
Snippets Groups Projects
Commit 892dd2f8 authored by Markus Grigull's avatar Markus Grigull
Browse files

Fix delete responses

Add relationship from visualization to project.
Add plot-type attribute.
parent 10402389
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,8 @@ var plotSchema = new Schema({
signal: { type: String, required: true },
width: { type: Number, required: true },
height: { type: Number, required: true },
title: { type: String }
title: { type: String },
type: { type: String, required: true }
});
module.exports = mongoose.model('Plot', plotSchema);
......@@ -6,6 +6,7 @@ var Schema = mongoose.Schema;
// visualization model
var visualizationSchema = new Schema({
name: { type: String, required: true },
project: { type: Schema.Types.ObjectId, ref: 'Project', required: true },
plots: [{ type: Schema.Types.ObjectId, ref: 'Plot' }]
});
......
......@@ -74,7 +74,7 @@ router.route('/plots/:id').delete(function(req, res) {
return res.send(err);
}
res.send({ plot: plot });
res.send({});
});
});
......
......@@ -90,7 +90,7 @@ router.route('/projects/:id').delete(function(req, res) {
return res.send(err);
}
res.send({ project: project });
res.send({});
});
});
......
......@@ -89,7 +89,7 @@ router.route('/users/:id').delete(auth.validateAdminLevel(1), function(req, res)
return res.send(err);
}
res.send({ user: user });
res.send({});
});
});
......
......@@ -74,7 +74,7 @@ router.route('/visualizations/:id').delete(function(req, res) {
return res.send(err);
}
res.send({ visualization: visualization });
res.send({});
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment