musora-content-services 1.0.195 → 1.0.196

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.196](https://github.com/railroadmedia/musora-content-services/compare/v1.0.195...v1.0.196) (2024-11-29)
6
+
5
7
  ### [1.0.195](https://github.com/railroadmedia/musora-content-services/compare/v1.0.194...v1.0.195) (2024-11-29)
6
8
 
7
9
  ### [1.0.194](https://github.com/railroadmedia/musora-content-services/compare/v1.0.193...v1.0.194) (2024-11-29)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.195",
3
+ "version": "1.0.196",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -752,9 +752,11 @@ export function getSortOrder(sort = '-published_on', groupBy) {
752
752
  sortOrder = groupBy ? 'name' : "title";
753
753
  break;
754
754
  case "name":
755
- case "popularity":
756
755
  sortOrder = sort;
757
756
  break;
757
+ case "popularity":
758
+ sortOrder = isDesc ? "coalesce(popularity, -1)" : "popularity";
759
+ break;
758
760
  case "published_on":
759
761
  default:
760
762
  sortOrder = "published_on";