Commit 6028cfdb authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

merge with testing

parent b4d3fe23
......@@ -6,6 +6,38 @@ module.exports = function (app) {
// ======== APP ROUTES - PROJECT ====================
var lang = 'DE'
app.get('/mailinglists', function (req, res) {
async.waterfall([
function(done) {
methods.getAllMailinglists(function(mailinglistOverview, err) {
if (!err) {
done(err, mailinglistOverview)
}
})
},
// create JSON object of mailinglists for front-end
function(mailinglistOverview, done) {
var allMailingLists = [] // JSON object
for (let i = 0; i < mailinglistOverview.length; i++) {
// add data to JSON object
allMailingLists.push({
id: mailinglistOverview[i].id,
name: mailinglistOverview[i].name,
src: mailinglistOverview[i].src,
projectstatus: mailinglistOverview[i].projectstatus,
project_title: mailinglistOverview[i].project_title
});
}
res.render(lang+'/project/mailinglists', {
isUserAuthenticated: req.isAuthenticated(),
user: req.user,
mailinglists: allMailingLists
});
}
])
});
app.get('/project', function (req, res) {
async.waterfall([
// get all projects from projectdb
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment