diff --git a/README.md b/README.md
index 2fd4641..b2d6dfa 100644
--- a/README.md
+++ b/README.md
@@ -29,10 +29,8 @@ primary key(category_id)
create table posts(
post_id mediumint unsigned not null AUTO_INCREMENT,
category_id mediumint unsigned not null,
-user_id mediumint unsigned not null,
picture_url varchar(100) not null,
published datetime not null,
-url varchar(100) not null,
name varchar(100) not null,
primary key(post_id)
);
diff --git a/admin/addCategory.html b/admin/addCategory.html
index 54bad0e..0bcb92b 100644
--- a/admin/addCategory.html
+++ b/admin/addCategory.html
@@ -1,10 +1,13 @@
-
Add Category
+
-
\ No newline at end of file
+
Add Category
+
+
+
\ No newline at end of file
diff --git a/admin/addCategory.js b/admin/addCategory.js
index 7a81949..60d8e5b 100644
--- a/admin/addCategory.js
+++ b/admin/addCategory.js
@@ -5,7 +5,6 @@ const qs = require('querystring');
var Promise = require('promise');
-
module.exports=
{
main: function(res, postData)
@@ -13,6 +12,15 @@ module.exports=
utils.include(res, "./admin/addCategory.html");
return this.processPost(res, postData);
},
+ /**
+ * Checks for post data regarding adding a new category.
+ * If a post is made with add_category, it parses the url-- replaces spaces
+ * with dashes -- and calls a insert method on the database
+ *
+ * @param res
+ * @param postData
+ * @return {*|Promise}
+ */
processPost: function(res, postData)
{
return new Promise(function(resolve, reject)
@@ -34,7 +42,7 @@ module.exports=
}
}
- resolve();
+ resolve(postData);
});
}
};
\ No newline at end of file
diff --git a/admin/admin.js b/admin/admin.js
index da72ba4..338657a 100644
--- a/admin/admin.js
+++ b/admin/admin.js
@@ -15,14 +15,19 @@ module.exports=
{
return new Promise(function(resolve, reject)
{
+ result.write("
");
});
}
};
\ No newline at end of file
diff --git a/admin/newPost.html b/admin/newPost.html
new file mode 100644
index 0000000..6bb80d8
--- /dev/null
+++ b/admin/newPost.html
@@ -0,0 +1,29 @@
+
Mauris neque quam, fermentum ut nisl vitae, convallis maximus nisl. Sed mattis nunc id lorem euismod placerat. Vivamus porttitor magna enim, ac accumsan tortor cursus at. Phasellus sed ultricies mi non congue ullam corper. Praesent tincidunt sed
-
- tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
BLOG ENTRY
-
-
Title description, April 2, 2014
-
-
-
-
-
-
-
-
Mauris neque quam, fermentum ut nisl vitae, convallis maximus nisl. Sed mattis nunc id lorem euismod placerat. Vivamus porttitor magna enim, ac accumsan tortor cursus at. Phasellus sed ultricies mi non congue ullam corper. Praesent tincidunt sed
-
- tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.
-
-
-
-
-
-
-
-
-
-
-
-
Comments 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
My Name
-
-
Just me, myself and I, exploring the universe of uknownment. I have a heart of love and a interest of lorem ipsum and mauris neque quam blog. I want to share my world with you.