eashaw on master
Update Travis CI config: node -… (compare)
eashaw on update-node-versions-in-travis-tests
Update travis config: node -> 16 (compare)
this.somevalue
always returns undefined -
...
primaryKey: 'id2',
attributes: {
id2: {
type: 'number',
required: true //if required:true is omited, sails lifts with no warning, but model is not accessible
},
}
...
try {
var a = await SomeModel.find().limit(10);
} catch(err) {
console.log(err)
}
name: 'UsageError',
code: 'E_INVALID_ARGINS',
problems: [Array] } },
isOperational: true,
adapterMethodName: 'find',
modelIdentity: 'SomeModel',
raw:
{ UsageError: Could not run select() because of 2 problems:
------------------------------------------------------
• "datastore" is required, but it was not defined.
• "models" is required, but it was not defined.
------------------------------------------------------
module.exports = { test: (req, res) => res.json({ it: 'works!'})}
it worked for GET 'http://localhost:1337/v1/demo/test
In v0.12 I am able to create blueprint routes with controller subfolder path name but in v1.0 it's not working. For example, I have controller in v1 sub directory like /api/controller/v1/DemoController.js . For this blueprint autogenerated api path is /api/v1/demo in Sails v0.12 but its not working in v1. In Sails v1 its working on path /api/demo. Is there any solution of my problem? @mikermcneil Help me please.