mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 02:42:48 +00:00
added file upload and fixed files reads on index page
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user