<component name="ChangeListManager">
<list default="true" id="c3f46dee-5c56-40ca-ada1-ba3d292b258d" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/1.0.0/routes/collectivities.js" afterPath="$PROJECT_DIR$/1.0.0/routes/collectivities.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.js" afterPath="$PROJECT_DIR$/index.js" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/sql/create.sql" afterPath="$PROJECT_DIR$/sql/create.sql" />
</list>
<ignored path="amiesserver.iws" />
<ignored path=".idea/workspace.xml" />
<file leaf-file-name="collectivities.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/1.0.0/routes/collectivities.js">
<provider selected="true" editor-type-id="text-editor">
- <state vertical-scroll-proportion="0.48064086">
- <caret line="80" column="5" selection-start-line="80" selection-start-column="5" selection-end-line="80" selection-end-column="5" />
+ <state vertical-scroll-proportion="0.81975967">
+ <caret line="134" column="0" selection-start-line="134" selection-start-column="0" selection-end-line="134" selection-end-column="0" />
<folding />
</state>
</provider>
<created>1465557633813</created>
<option name="number" value="Default" />
<updated>1465557633813</updated>
- <workItem from="1465557634994" duration="41359000" />
+ <workItem from="1465557634994" duration="41508000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
- <option name="totallyTimeSpent" value="41359000" />
+ <option name="totallyTimeSpent" value="41508000" />
</component>
<component name="ToolWindowManager">
<frame x="65" y="-904" width="1375" height="904" extended-state="6" />
</entry>
<entry file="file://$PROJECT_DIR$/1.0.0/routes/collectivities.js">
<provider selected="true" editor-type-id="text-editor">
- <state vertical-scroll-proportion="0.48064086">
- <caret line="80" column="5" selection-start-line="80" selection-start-column="5" selection-end-line="80" selection-end-column="5" />
+ <state vertical-scroll-proportion="0.81975967">
+ <caret line="134" column="0" selection-start-line="134" selection-start-column="0" selection-end-line="134" selection-end-column="0" />
<folding />
</state>
</provider>
Models.Collectivity_Notule.where('collectivity_id',req.token.collectivity_id).fetchAll({withRelated: ['notule']})
.then(function (notules){
if(!notules){
- res.json({success: true, message:"no notule"})
+ return res.json({success: true, message:"no notule"});
}
console.log(notules.toJSON());
// console.log(notules.related('notules').toJSON());
- res.json({success : true, message :notules.related('notules').toJSON()});
- res.json({success : true, message :notules.toJSON()});
+ res.json({success : true, message :notules.toJSON()});
})
.catch(function(err){
res.json({succes : false, message : err});