();
+ param.add("query", term);
+ final JsonNode node = redditRestTemplate.postForObject("https://oauth.reddit.com//api/search_reddit_names", param, JsonNode.class);
+ return node.get("names").toString();
+ }
+
// === post actions
@RequestMapping(value = "/deletePost/{id}", method = RequestMethod.DELETE)
@@ -164,6 +182,11 @@ public class RedditController {
post.setTitle(formParams.get("title"));
post.setSubreddit(formParams.get("sr"));
post.setUrl(formParams.get("url"));
+
+ post.setNoOfAttempts(Integer.parseInt(formParams.get("attempt")));
+ post.setTimeInterval(Integer.parseInt(formParams.get("interval")));
+ post.setMinScoreRequired(Integer.parseInt(formParams.get("score")));
+
if (formParams.containsKey("sendreplies")) {
post.setSendReplies(true);
} else {
diff --git a/spring-security-oauth/src/main/resources/persistence-dev.properties b/spring-security-oauth/src/main/resources/persistence-dev.properties
new file mode 100644
index 0000000000..fe07bf298d
--- /dev/null
+++ b/spring-security-oauth/src/main/resources/persistence-dev.properties
@@ -0,0 +1,10 @@
+################### DataSource Configuration ##########################
+jdbc.driverClassName=com.mysql.jdbc.Driver
+jdbc.url=jdbc:mysql://localhost:3306/oauth_reddit?createDatabaseIfNotExist=true
+jdbc.user=tutorialuser
+jdbc.pass=tutorialmy5ql
+init-db=false
+################### Hibernate Configuration ##########################
+hibernate.dialect=org.hibernate.dialect.MySQLDialect
+hibernate.show_sql=false
+hibernate.hbm2ddl.auto=update
diff --git a/spring-security-oauth/src/main/resources/persistence-prod.properties b/spring-security-oauth/src/main/resources/persistence-production.properties
similarity index 52%
rename from spring-security-oauth/src/main/resources/persistence-prod.properties
rename to spring-security-oauth/src/main/resources/persistence-production.properties
index 856c4ce00c..8e61e06635 100644
--- a/spring-security-oauth/src/main/resources/persistence-prod.properties
+++ b/spring-security-oauth/src/main/resources/persistence-production.properties
@@ -1,10 +1,9 @@
################### DataSource Configuration ##########################
jdbc.driverClassName=org.postgresql.Driver
-jdbc.url=jdbc:postgres://fkqrbxdwqbrzhv:Y83Axvgz5iC_tyRZQxI0KEmUEG@ec2-107-20-222-114.compute-1.amazonaws.com:5432/dfmoej36meltnj
-jdbc.user=fkqrbxdwqbrzhv
-jdbc.pass=Y83Axvgz5iC_tyRZQxI0KEmUEG
-
+jdbc.url=jdbc:postgresql://ec2-184-73-253-4.compute-1.amazonaws.com:5432/d3th4rkdb2g3p6?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
+jdbc.user=fhjspqyblvawvp
+jdbc.pass=gRKGJbdHXslq0XgdI03j2Y4YoE
################### Hibernate Configuration ##########################
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
hibernate.show_sql=false
-hibernate.hbm2ddl.auto=update
+hibernate.hbm2ddl.auto=create-drop
diff --git a/spring-security-oauth/src/main/webapp/WEB-INF/jsp/editPostForm.jsp b/spring-security-oauth/src/main/webapp/WEB-INF/jsp/editPostForm.jsp
index 8a0f574c82..de3090844e 100755
--- a/spring-security-oauth/src/main/webapp/WEB-INF/jsp/editPostForm.jsp
+++ b/spring-security-oauth/src/main/webapp/WEB-INF/jsp/editPostForm.jsp
@@ -50,8 +50,42 @@ border-color: #ddd;
-
-
+
+
+
+
+
+
+ Votes didn't exceed
+
+
+
+
+ within
+
+
+
+ try resubmitting
+
+ times.
+
+
+
+
+
+
+
@@ -39,15 +41,21 @@ border-color: #ddd;
-
+
-
+
+
+
-
+
@@ -81,7 +89,7 @@ border-color: #ddd;
-
+
+
+