Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit 73c4b62

Browse files
authored
Merge pull request #87 from paiindustries/fix/blog-categories
blog categories and load dynamic response
2 parents 02f4737 + 5d7a151 commit 73c4b62

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/controllers/web/BlogController.cfc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,20 +669,20 @@ component extends="app.Controllers.Controller" {
669669
public function getBlogsByCategory(required string categoryName) {
670670
// Get category ID from name
671671
var category = model("Category").findOne(where="name = '#arguments.categoryName#'");
672-
if (!isObject(category)) return [];
672+
if (!isObject(category)) return queryNew("");
673673

674674
// Get all blog-category mappings with that category
675675
var blogCategoryQuery = model("BlogCategory")
676676
.findAll(where="categoryId = #category.id#", returnAs="query");
677677

678-
if (blogCategoryQuery.recordCount == 0) return [];
678+
if (blogCategoryQuery.recordCount == 0) return queryNew("");
679679

680680
// Extract blogIds
681681
var blogIds = blogCategoryQuery.columnData("blogId");
682682

683683
// Get blog posts with matching IDs
684684
return model("Blog").findAll(
685-
where="id IN (#arrayToList(blogIds)#) AND category_id = '#category.id#'",
685+
where="id IN (#arrayToList(blogIds)#) AND categoryId = '#category.id#' AND status ='Approved' AND isPublished='true'",
686686
order="createdAt DESC",
687687
include="User,BlogCategory",
688688
returnAs="query"

app/views/web/AuthController/forgotPassword.cfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
if (xhr.responseText && xhr.responseText.trim() !== '' && xhr.responseURL.includes("/auth/send-reset-link")) {
135135
if (event.detail.successful) {
136136
if (xhr.status === 200 && xhr.responseURL.includes("/auth/send-reset-link")) {
137-
notifier.show('Success!', 'Reset instructions have been sent to your email.', 'success', '', 4000);
137+
notifier.show('Success!', xhr.responseText, 'success', '', 4000);
138138
setTimeout(() => {
139139
window.location.href = "/login";
140140
}, 3000);

0 commit comments

Comments
 (0)