1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

added file upload and fixed files reads on index page

This commit is contained in:
2016-01-06 10:40:15 -06:00
parent 63f1540e7d
commit 266ff19043
10 changed files with 14170 additions and 15 deletions

View File

@@ -170,11 +170,19 @@ function timeValidator(time){
function renderIndex(res, json){
getPosts(function(posts){
res.render('index',{returnParameters : json,
blogPosts : posts});
if(typeof json.getPost == 'undefined'){
getPosts(function(posts){
res.render('index', {returnParameters : json, blogPosts : posts});
});
}
else{
res.render('index', {returnParameters : json});
}
}
//function to get the posts - sorts them by birth time