create.js file - "module.exports = function(req, res) {
const postBody = req.body.postBody
sails.log.info("Post Created: " + postBody)
const record = await Post.create({ text: postBody }).fetch()
res.send(record)
}"
Post.js file - "module.exports = {
attributes: {
text: {
type: 'string',
required: true
}
},
};"
for ';' i noticed you did not include this in the video, but in the User.js file it had it at the end, I am more of a C++/Java programmer so still getting used to some of the JS syntax.