Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default field value indexes not recognised #284

Closed
mingard opened this issue May 26, 2017 · 1 comment
Closed

default field value indexes not recognised #284

mingard opened this issue May 26, 2017 · 1 comment
Assignees

Comments

@mingard
Copy link
Contributor

mingard commented May 26, 2017

Expected behavior

a config containing a sort of createdAt and an index of createdAt should save successfully through a request to /config

e.g.

"sort": "createdAt",
"index": [
      {
        "keys": {
          "createdAt" : 1
        }
      },
      {
        "keys": {
          "name" : 1
        }
      }
     ],

Actual behavior

An error is thrown:

{
  "statusCode": 400,
  "success": false,
  "errors": [
    {
      "code": "API-0001",
      "title": "Missing Index Key",
      "details": "'createdAt' is specified as the primary sort field, but is missing from the index key collection.",
      "docLink": "http://docs.dadi.tech/errors/api/API-0001"
    }
  ]
}
@jimlambie
Copy link
Contributor

Closed via 450540d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants