Is there a way to trigger a fetch right after saving data? I'm looking to immediately retrieve information after a successful post...
Below is the code snippet in question:
search: function (search) {
searchM = new SearchM();
searchM.save({
channel: this.$('#channel').val(),
week: this.$('#week').val(),
year: this.$('#year').val(),
filter: this.$('#filter').val()
},
{success: listStore()});
function listStore () {
console.log('list it');
searchM.fetch({success: function (result) {
console.log(result);
}});
}
},