Contrary to my previous opened issue, where I said it was working fine, I just got some errors.
Did this package ever get tested combined with https://github.com/duyluonglc/lucid-mongo ?
/users?page[number]=1&page[size]=1000
module.exports = {
globalOptions: {
convertCase: 'snake_case',
unconvertCase: 'camelCase',
},
registry: {
user: {
model: 'App/Models/User',
structure: {
links: {
self: data => `/users/${data._id}`,
},
topLevelLinks: {
self: '/users',
},
},
},
},
};
{
"error": {
"message": "Failed to parse: { find: \"users\", filter: {}, limit: \"1000\", returnKey: false, showRecordId: false }. 'limit' field must be numeric.",
"name": "MongoError",
"status": 500,
"frames": [
{
"file": "node_modules/mongodb-core/lib/cursor.js",
"method": "queryCallback",
"line": 244,
"column": 25,
"context": {
"start": 239,
"pre": " result.documents[0]['errmsg'] ||\n Array.isArray(result.documents[0].result))\n ) {\n // We have a an error document return the error\n if (result.documents[0]['$err'] || result.documents[0]['errmsg']) {",
"line": " return callback(new MongoError(result.documents[0]), null);",
"post": " }\n\n // We have a cursor document\n if (result.documents[0].cursor != null && typeof result.documents[0].cursor !== 'string') {\n var id = result.documents[0].cursor.id;"
},
"isModule": true,
"isNative": false,
"isApp": false
},
{
"file": "node_modules/mongodb-core/lib/connection/pool.js",
"method": null,
"line": 544,
"column": 18,
"context": {
"start": 539,
"pre": "\n function handleOperationCallback(self, cb, err, result) {\n // No domain enabled\n if (!self.options.domainsEnabled) {\n return process.nextTick(function() {",
"line": " return cb(err, result);",
"post": " });\n }\n\n // Domain enabled just call the callback\n cb(err, result);"
},
"isModule": true,
"isNative": false,
"isApp": false
},
{
"file": "internal/process/next_tick.js",
"filePath": "internal/process/next_tick.js",
"method": "_combinedTickCallback",
"line": 131,
"column": 7,
"context": {},
"isModule": false,
"isNative": true,
"isApp": false
},
{
"file": "internal/process/next_tick.js",
"filePath": "internal/process/next_tick.js",
"method": "process._tickCallback",
"line": 180,
"column": 9,
"context": {},
"isModule": false,
"isNative": true,
"isApp": false
},
{
"file": "node_modules/mquery/lib/mquery.js",
"method": "Query.then",
"line": 2775,
"column": 17,
"context": {
"start": 2770,
"pre": " * @api public\n */\n\nQuery.prototype.then = function(resolve, reject) {\n var self = this;",
"line": " var promise = new Query.Promise(function(success, error) {",
"post": " self.exec(function(err, val) {\n if (err) error(err);\n else success(val);\n self = success = error = null;\n });"
},
"isModule": true,
"isNative": false,
"isApp": false
}
]
}
}