@galadrim/galadmin 0.1.207 → 0.1.208

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galadrim/galadmin",
3
- "version": "0.1.207",
3
+ "version": "0.1.208",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
package/src/api.ts CHANGED
@@ -212,7 +212,7 @@ export default (db, config, user) => {
212
212
  customQuery: view.customQuery,
213
213
  join: view.join,
214
214
  selectExpression: view.selectExpression,
215
- orderBy: req.body.orderBy || (view.subviews && req.body.subviewIndex !== undefined ? view.subviews[req.body.subviewIndex]?.orderBy : null) || view.orderBy,
215
+ orderBy: [req.body.orderBy || (view.subviews && req.body.subviewIndex !== undefined ? view.subviews[req.body.subviewIndex]?.orderBy : null) || view.orderBy, view.primaryId].filter(x => x).join(", "),
216
216
  isDesc: req.body.isDesc === null ? view.isDesc : req.body.isDesc,
217
217
  primaryId: view.primaryId,
218
218
  query: req.body.query,