我是Strongloop的新手,只是看过文档和样本,但从未见过我想要的问题。我有两个模型,sence.js和log.js,并让post请求从移动应用到rest-api的句子
Model sentence.js (dont want save to db this model, only for parsing and creating log model)
{
name: 'sentence',
type: 'string'
}
Model log.js
{ name: 'lat', type: 'string' },
{ name: 'lng', type: 'string' }
[HTTP POST] myserver/api/sentence?d=$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A
模型已触发方法,例如afterInitialize,beforeValidate和beforeSave。现在,哪种触发方法或任何其他作用域最适合解析句子模型和创建日志模型?
谢谢 !
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句