{/if}
- Leave a thumbs up if you liked it
+ Leave a thumbs up if you liked it
diff --git a/component/src/main/resources/web/blogpage/blog-index.js b/component/src/main/resources/web/blogpage/blog-index.js
index de0257a..a8eced5 100644
--- a/component/src/main/resources/web/blogpage/blog-index.js
+++ b/component/src/main/resources/web/blogpage/blog-index.js
@@ -32,4 +32,48 @@ $(document).ready(function() {
});
checkScrollPosition();
+
+ $("#btnRate").on('click', function (e) {
+
+ const btn = $(e.target);
+
+ if(btn.hasClass("thumbs-up-success")) {
+
+ $.ajax({
+ type: 'POST',
+ url: `/blog-posts/${btn.attr("name")}/thumbs-down`,
+ success: function () {
+ btn.removeClass("thumbs-up-success").removeClass("pulse");
+ },
+ error: function (err) {
+ btn.addClass("tada");
+ }
+ });
+
+ } else {
+
+ grecaptcha.ready(function () {
+ grecaptcha
+ .execute("6Lc7vagqAAAAAKi_E_E275yxYo_B80-RvOVmVaid", { action: "submit" })
+ .then(function (token) {
+ $.ajax({
+ type: 'POST',
+ url: `/blog-posts/${btn.attr("name")}/thumbs-up`,
+ dataType: 'json',
+ contentType: "application/json",
+ data: JSON.stringify({
+ captcha: token
+ }),
+ success: function () {
+ btn.addClass("thumbs-up-success").addClass("pulse");
+ },
+ error: function (err) {
+ btn.addClass("tada");
+ }
+ });
+ });
+ });
+ }
+ });
+
});
diff --git a/doc/cluster.md b/doc/cluster.md
index ad0719d..ddcee21 100644
--- a/doc/cluster.md
+++ b/doc/cluster.md
@@ -79,3 +79,7 @@ some debugging actions
kubectl describe clusterissuer letsencrypt-prod
kubectl describe ingress gdevxy-ingress
```
+
+## Database
+
+Add egress rule to load balancer config for port