diff --git a/_config.yml b/_config.yml index 29d9bb2..ded0eb0 100644 --- a/_config.yml +++ b/_config.yml @@ -216,4 +216,5 @@ future: true # Custom configuration custom-config: blog-services: - service_url: 'http://localhost:5000' \ No newline at end of file + service_url: 'https://localhost:7013/api/v1/blog/posts' + service_key: '' \ No newline at end of file diff --git a/_includes/head.html b/_includes/head.html index 512abae..0b02774 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -104,21 +104,51 @@ {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} diff --git a/_includes/likes-views.html b/_includes/likes-views.html index 1aef965..f75979f 100644 --- a/_includes/likes-views.html +++ b/_includes/likes-views.html @@ -24,21 +24,53 @@ {% include views.html tooltip=true onload=false lang=lang %} {% include likes.html tooltip=true onload=false lang=lang %} +{% include comments-counter.html tooltip=true lang=lang %} \ No newline at end of file diff --git a/_includes/likes.html b/_includes/likes.html index 41239d5..f87be34 100644 --- a/_includes/likes.html +++ b/_includes/likes.html @@ -37,7 +37,7 @@ function apiCall(url, event) { onLoadAndClick(); - ajax(url) + ajax(url, "POST") .then(function (result) { console.log(result); if (event === "click") { @@ -48,7 +48,7 @@ }); } - var apiUrl = serviceUrl + "/GetPostLikes?siteId=" + siteId + "&postId=" + postId; + var apiUrl = serviceUrl + "/GetPostLikes?blogUrl=" + siteId + "&postSlug=" + postId; if(likesOnLoad == "{{include.onload}}"){ apiCall(apiUrl); @@ -56,9 +56,9 @@ heartIcon.addEventListener("click", () => { if (!heartIcon.classList.contains("liked")) { - apiUrl = serviceUrl + "/LikePost?siteId=" + siteId + "&postId=" + postId; + apiUrl = serviceUrl + "/LikePost?blogUrl=" + siteId + "&postSlug=" + postId; } else { - apiUrl = serviceUrl + "/DislikePost?siteId=" + siteId + "&postId=" + postId; + apiUrl = serviceUrl + "/DislikePost?blogUrl=" + siteId + "&postSlug=" + postId; } apiCall(apiUrl, "click"); diff --git a/_includes/views.html b/_includes/views.html index 149c239..5d537d5 100644 --- a/_includes/views.html +++ b/_includes/views.html @@ -1,7 +1,6 @@ - - +