static get tableName () {
return 'users'
}
static get jsonSchema () {
return {
type: 'object',
required: ['id', 'email', 'username', 'password'],
properties: {
id: { type: 'integer' },
email: { type: 'string', format: 'email' },
username: { type: 'string' },
password: { type: 'string' },
about: { type: 'string' },
createdAt: { type: 'string', format: 'date' }
}
}
}
I get the error with this query
User.query().insert({
email: req.query.email,
username: req.query.username,
password: req.query.password
})
})
Try to add this to model.
email!: string;
username!: string;
password!: string;
Most helpful comment
Try to add this to model.
email!: string; username!: string; password!: string;