0
Почему это не отображает все каналы. Как я могу отобразить все каналы.как показать все записи с помощью bookshelfjs
new channelModel()
.fetch()
.then(function (channel) {
console.log(channel.attributes.name);
if (channel) {
res.json({error: false, status: 200, data: channel.attributes.name});
} else {
res.json({error: true, status: 404, data: 'channel does not exist'});
}
})
.otherwise(function (err) {
res.status(500).json({error: true, data: {message: err.message}});
});
Есть идеи?